Exemplo n.º 1
0
 // Initialization
 void Start()
 {
     // Get the tracker / reference to sensor info
     tracker = GameObject.Find("Tracker").GetComponent <SensorInterface>();
     // Get a reference to the Animator component
     anim = GetComponent <Animator>();
     /// Start state
     // Disable user control at start
     setUserControl(0f);
 }
Exemplo n.º 2
0
 // Initialization
 void Start()
 {
     // Get bird RigidBody (physics body)
     rb = GetComponent <Rigidbody>();
     // Get left and right lift points
     leftLiftPoint  = transform.GetChild(0);
     rightLiftPoint = transform.GetChild(1);
     // Get the group (parent) velocity reference
     group = rb.transform.parent.GetComponent <VelocityFromPosition>();
     // Get the tracker / reference to sensor info
     tracker = GameObject.Find("Tracker").GetComponent <SensorInterface>();
 }