示例#1
0
 // Use this for initialization
 void Start()
 {
     bodyguard   = FindObjectOfType <BodyguardController> ();
     president   = FindObjectOfType <PresidentController> ();
     animator    = GetComponent <Animator> ();
     allowFire   = true;
     origFirePos = firePos.transform.position;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     president = FindObjectOfType <PresidentController> ();
     bodyguard = FindObjectOfType <BodyguardController> ();
     if (bodyguard.turnedR < 0f)
     {
         speed = -speed;
     }
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     president      = FindObjectOfType <PresidentController> ();
     bodyguard      = FindObjectOfType <BodyguardController> ();
     shootDirection = (president.transform.position - transform.position).normalized;
 }