Пример #1
0
 void Start()
 {
     handR = GameObject.Find("hand_right");
     handL = GameObject.Find("hand_left");
     handR.gameObject.AddComponent <SphereCollider>();
     handL.gameObject.AddComponent <SphereCollider>();
     player      = GameObject.FindGameObjectWithTag("Player");
     ballManager = GameObject.FindGameObjectWithTag("BallManager").GetComponent <BallManager>();
     controllers = GameObject.FindGameObjectWithTag("BallManager").GetComponent <OVRControllerInputs>();
     PrevPos     = transform.position;
     NewPos      = transform.position;
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     controllers  = GameObject.FindGameObjectWithTag("Controllers").GetComponent <OVRControllerInputs>();
     handAnimator = gameObject.GetComponent <Animator>();
 }