private void Awake() { _partOfWave = GetComponentInParent <IEnemyWave>(); _mySprite = GetComponentInChildren <SpriteRenderer>(); _collider2D = GetComponentInChildren <Collider2D>(); _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX); }
private void Awake() { _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.Weapons); _audioSource = GetComponent <AudioSource>(); _audioSource.clip = _laserSFX; _audioSource.volume = _volume; }
private void Awake() { _startingHealth = _health; _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX); _myDamage = GetComponent <IShowDamage>(); _myAudioSource = GetComponent <AudioSource>(); if (cheat) { Debug.Log("Cheat ON"); } }
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++; } }
private void Awake() { _audioSource = GetComponent <AudioSource>(); _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.Weapons); }
private void Awake() { _poolingAgent = _poolingAgent.SetUpPoolingAgent(GetComponents <PoolingAgent>(), PoolingID.FX); _startingPos = transform.localPosition; }