void Start() { offlinePly = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>(); rg = GetComponent <Rigidbody>(); aiAnim = GetComponent <Animator>(); totalDesiredFleeVel = Vector3.zero; totalDesiredSeekVel = Vector3.zero; }
private void Awake() { playerAnim = GetComponent <Animator>(); coolDownImage = GameObject.FindGameObjectWithTag("DropAbility"); coolDown = 0; playerBody = gameObject.GetComponent <Rigidbody>(); playerCollider = gameObject.GetComponent <BoxCollider>(); offlinePlyStats = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>(); }
void Awake() { zombieAnim = this.gameObject.GetComponent <Animator>(); rg = GetComponent <Rigidbody>(); delayedDamage = 2; timeToAttack = 2; attacking = false; offZomPool = GameObject.FindGameObjectWithTag("OfflineZombieSpawner").GetComponent <OfflineZombiePool>(); offlinePly = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>(); players = GameObject.FindGameObjectsWithTag("Player").OrderBy(go => go.name).ToArray(); randomTarget = Random.Range(0, players.Length); }