예제 #1
0
    private float _timer;     // provides delay between attacks


    void Awake()
    {
        _player          = GameObject.FindGameObjectWithTag("Player");
        _playerLifecycle = _player.GetComponent <TankLifecycle>();
        _enemyLifecycle  = GetComponent <EnemyLifecycle>();
        _anim            = GetComponent <Animator>();
    }
예제 #2
0
 private void Awake()
 {
     _player          = GameObject.FindGameObjectWithTag("Player").transform;
     _playerLifecycle = _player.GetComponent <TankLifecycle>();
     _lifecycle       = GetComponent <EnemyLifecycle>();
     _nav             = GetComponent <NavMeshAgent>();
 }
예제 #3
0
	private void Awake() {
		_playerLifecycle = GameObject.FindGameObjectWithTag("Player").GetComponent<TankLifecycle>();

		foreach (Transform plane in spawnContainer.transform) {
			plane.GetComponent<MeshRenderer>().enabled = false;
			_spawnPlanes.Add(plane);
		}
	}
예제 #4
0
 private void Awake()
 {
     _playerLifecycle = GameObject.FindGameObjectWithTag("Player").GetComponent <TankLifecycle>();
     anim             = GetComponent <Animator>();
 }