示例#1
0
    void Start()
    {
        RUISInputManager inputManager = FindObjectOfType(typeof(RUISInputManager)) as RUISInputManager;

        if (inputManager)
        {
            RUISPSMoveWand[] moveWands = inputManager.GetComponentsInChildren <RUISPSMoveWand>();
            foreach (RUISPSMoveWand wand in moveWands)
            {
                if (moveID == wand.controllerId)
                {
                    moveWand = wand;
                }
            }
        }
        rigidBody = this.gameObject.GetComponent <Rigidbody>();
    }