private float _timer; // provides delay between attacks void Awake() { _player = GameObject.FindGameObjectWithTag("Player"); _playerLifecycle = _player.GetComponent <TankLifecycle>(); _enemyLifecycle = GetComponent <EnemyLifecycle>(); _anim = GetComponent <Animator>(); }
private void Awake() { _player = GameObject.FindGameObjectWithTag("Player").transform; _playerLifecycle = _player.GetComponent <TankLifecycle>(); _lifecycle = GetComponent <EnemyLifecycle>(); _nav = GetComponent <NavMeshAgent>(); }
private void Awake() { _playerLifecycle = GameObject.FindGameObjectWithTag("Player").GetComponent<TankLifecycle>(); foreach (Transform plane in spawnContainer.transform) { plane.GetComponent<MeshRenderer>().enabled = false; _spawnPlanes.Add(plane); } }
private void Awake() { _playerLifecycle = GameObject.FindGameObjectWithTag("Player").GetComponent <TankLifecycle>(); anim = GetComponent <Animator>(); }