Skip to content

Instantly share code, notes, and snippets.

@johro
johro / ruby
Created July 28, 2017 05:04
Rubyの参照の値渡しのテスト
class Sample
def array_change_all(v)
p 'value method start'
p v.object_id
v = [10, 2, 3]
p v.object_id
p 'value method end'
end
def array_change_one(v)
p 'value method start'
@johro
johro / UnityChanController
Created July 17, 2015 09:54
Photon Unity Networking (Animation)
using UnityEngine;
using System.Collections;
public class UnityChanController : Photon.MonoBehaviour
{
[Range(0.0f,10.0f)]
public float speed = 0.1f;
private Animator anim;
private float yRotate = 0.0f;
@johro
johro / StreetViewImageLoader
Created July 13, 2015 09:44
Google Street ViewをUnityで表示させる
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class StreetViewImageLoader : MonoBehaviour
{
public Material material;
private double heading = 0.0;
private double pitch = 0.0;
using UnityEngine;
using System.Collections;
public class PlayerController : Photon.MonoBehaviour {
private Rigidbody rb;
private float speed = 100;
// Use this for initialization
void Start () {
rb = GetComponent<Rigidbody>();
using UnityEngine;
using System.Collections;
public class PlayerController : Photon.MonoBehaviour {
private Rigidbody rb;
private float speed = 100;
// Use this for initialization
void Start () {
rb = GetComponent<Rigidbody>();
using UnityEngine;
using System.Collections;
public class NetworkManager : Photon.MonoBehaviour {
void Start()
{
//photonの初期設定
PhotonNetwork.ConnectUsingSettings("v0.1");
Debug.Log("Called");
using System;
using System.IO;
using System.IO.Ports;
using System.Threading;
using UnityEngine;
public class Light_controll : MonoBehaviour
{
private const string SERIAL_PORT = "COM6";
private const int SERIAL_BAUD_RATE = 115200;