private void Awake() { Health = GetComponent <EnemyHealh>(); m_Agent = GetComponent <NavMeshAgent>(); Health.Initialize(m_Stats); PillarHealth.OnPillarDestroy += OnPillarDestroyed; }
void OnEnemyDeath(EnemyHealh health) { //Increment combo, this must be first to make sure this will be at least 1 m_Combo++; //Add score m_Score += CalculateComboScore(health.m_Stats.m_ScoreValue); //Set combo timer m_TargetComboTime = CalculateComboTime(); m_CurrentMaxTargetComboTime = m_TargetComboTime; }
//Called when some enemy was killed void OnEnemyDeath(EnemyHealh health) { m_EnemiesAlive--; }