Inheritance: MonoBehaviour
コード例 #1
0
	private void Setup(){
		// we'll keep a local reference to the mocap osc interface
		mocapInstance = MoCapOscInterface.instance;

		// create objects for every rigid body that's already in the system
		foreach (MoCapRigidBody current in mocapInstance.rigidbodies) {
			createFollower(current);
		}

		// register an event callback handler that creates new objects for
		// every new rigid body that is introduced to the system at a later time
		MoCapOscInterface.OnNewRigidBody += onNewRigidBody;
	}
コード例 #2
0
ファイル: MoCapOscInterface.cs プロジェクト: davidjonas/MoCap
    void Awake()
    {
        // Singleton stuff
        if(instance == null){
            instance = this;
        } else {
            Debug.LogError("MoCapOscInterface is a singleton class; only one game object is allowed to have this component");
            Destroy (gameObject);
        }

        rigidbodies = new List<MoCapRigidBody>();
        oscMessageQueue = new List<OscMessage> ();
    }
コード例 #3
0
	// Use this for initialization
	void Start () {
		// start with uninitialized state
		mocapInstance = null;

		// we'll need a rigidBodyObject to initialize
		if (rigidBodyObject == null) {
			Debug.LogWarning ("rigidBodyObject not specified");
			// abort
			return;
		}

		// ok let's get ready
		Setup ();
	}
コード例 #4
0
    private void Setup()
    {
        // we'll keep a local reference to the mocap osc interface
        mocapInstance = MoCapOscInterface.instance;

        // create objects for every rigid body that's already in the system
        foreach (MoCapRigidBody current in mocapInstance.rigidbodies)
        {
            createFollower(current);
        }

        // register an event callback handler that creates new objects for
        // every new rigid body that is introduced to the system at a later time
        MoCapOscInterface.OnNewRigidBody += onNewRigidBody;
    }
コード例 #5
0
    // Use this for initialization
    void Start()
    {
        // start with uninitialized state
        mocapInstance = null;

        // we'll need a rigidBodyObject to initialize
        if (rigidBodyObject == null)
        {
            Debug.LogWarning("rigidBodyObject not specified");
            // abort
            return;
        }

        // ok let's get ready
        Setup();
    }
コード例 #6
0
    void Awake()
    {
        // Singleton stuff
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Debug.LogError("MoCapOscInterface is a singleton class; only one game object is allowed to have this component");
            Destroy(gameObject);
        }

        rigidbodies     = new List <MoCapRigidBody>();
        oscMessageQueue = new List <OscMessage> ();
    }