private void OnEnable() { //get objets to subscribe to levelManager = FindObjectOfType <LevelManager>(); basis = FindObjectOfType <BaseCollisionController>(); //create EnemyWaveController waveController = new EnemyWaveController(levelManager.Level.Waves); //subscribe to events levelManager.SpawnWave += NewWave; basis.HandleEnemyCollision += EnemyDestroyed; EnemyDeathController.HandleEnemyDeath += EnemyDied; }
private void Awake() { currentHealth = this.totalHealth; baseCollisionController = GetComponent <BaseCollisionController>(); this.healthTreshold = CalculateHealthThreshold(); }
private void Awake() { collisionController = GetComponent <BaseCollisionController>(); stateManager = GetComponent <StateManager>(); }