public void Death() { //return to pool //OnMonsterDisable?.Invoke(this); //disable monster Debug.Log("I'm dead " + gameObject.name); OnMonsterDeath?.Invoke(_enemyValue); }
private void Boss_OnDeath(IMonster boss, ulong reward) { Level++; OnMonsterDeath?.Invoke(boss, reward); OnLevelUp?.Invoke(Level); GenerateMinions(); GenerateBoss(); }
private void Minion_OnDeath(IMonster minion, ulong reward) { OnMonsterDeath?.Invoke(minion, reward); Minions.Remove((Minion)minion); if (Minions.Count == 0) { _currentMonster = Boss; } else { _currentMonster = Minions.First(); } OnNewMonster?.Invoke(_currentMonster); }
protected virtual void _onMonsterDeath() { OnMonsterDeath?.Invoke(this, EventArgs.Empty); }
public void Death() { OnMonsterDeath?.Invoke(this); Destroy(gameObject); }
protected virtual void _onMonsterDeath() { MonsterEventArgs args = new MonsterEventArgs(this); OnMonsterDeath?.Invoke(this, args); }