예제 #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());
        }
예제 #2
0
 private void EnemyFinished(WaveHandler handler, IEnemy obj) => OnEnemyFinished?.Invoke(obj);
예제 #3
0
 private void Enemy_OnFinished(IEnemy obj)
 {
     OnEnemyDone();
     Timeline.Punisher.Punish(obj);
     OnEnemyFinished?.Invoke(this, obj);
 }
예제 #4
0
 private void OnTriggerEnter2D(Collider2D other1)
 {
     OnEnemyFinished?.Invoke(other1.gameObject);
     Destroy(other1.gameObject);
 }