Exemple #1
0
 private void Awake()
 {
     _partOfWave   = GetComponentInParent <IEnemyWave>();
     _mySprite     = GetComponentInChildren <SpriteRenderer>();
     _collider2D   = GetComponentInChildren <Collider2D>();
     _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX);
 }
Exemple #2
0
 private void Awake()
 {
     _poolingAgent       = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.Weapons);
     _audioSource        = GetComponent <AudioSource>();
     _audioSource.clip   = _laserSFX;
     _audioSource.volume = _volume;
 }
Exemple #3
0
 private void Awake()
 {
     _startingHealth = _health;
     _poolingAgent   = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX);
     _myDamage       = GetComponent <IShowDamage>();
     _myAudioSource  = GetComponent <AudioSource>();
     if (cheat)
     {
         Debug.Log("Cheat ON");
     }
 }
Exemple #4
0
    private void Awake()
    {
        _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.UIElement);
        _mainCamera   = Camera.main;
        int index = 0;

        numberOfEnemiesInWave = transform.childCount;
        enemiesLeft           = numberOfEnemiesInWave;
        enemies = new GameObject[enemiesLeft];
        foreach (Transform child in transform)
        {
            enemies[index] = child.gameObject;
            index++;
        }
    }
Exemple #5
0
 private void Awake()
 {
     _audioSource  = GetComponent <AudioSource>();
     _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.Weapons);
 }
Exemple #6
0
 private void Awake()
 {
     _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX);
     _startingPos  = transform.localPosition;
 }