Example #1
0
        void continueBoss(object sender, EventArgs args)
        {
            CurrentEnenmyIndex++;
            CurrentEnemy.OnEnemyFinished -= continueBoss;
            CurrentEnemy.DeactiveEnemyComponent();

            if (CurrentEnenmyIndex > BossComponents.Count - 1)
            {
                OnEnemyFinished?.Invoke(this, new EventArgs());
            }
            else
            {
                continueToNextEnemy();
            }

            OnEnemyConditionChange?.Invoke(this, new EventArgs());
        }
Example #2
0
 private void EnemyFinished(WaveHandler handler, IEnemy obj) => OnEnemyFinished?.Invoke(obj);
 private void Enemy_OnFinished(IEnemy obj)
 {
     OnEnemyDone();
     Timeline.Punisher.Punish(obj);
     OnEnemyFinished?.Invoke(this, obj);
 }
Example #4
0
 private void OnTriggerEnter2D(Collider2D other1)
 {
     OnEnemyFinished?.Invoke(other1.gameObject);
     Destroy(other1.gameObject);
 }