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