Пример #1
0
 private void OnParticleCollision(GameObject other)
 {
     Health -= ParticleDamage;
     if (Health <= 0)
     {
         OnEnemyDie?.Invoke(Reward);
         Destroy(gameObject);
     }
 }
 private void OnEnemyDieHandler(int score)
 {
     OnEnemyDie?.Invoke(score);
 }
Пример #3
0
 internal static void KillEnemy(EnemyBehaviour enemyBehaviour)
 {
     OnEnemyDie?.Invoke(enemyBehaviour);
 }
 private void Enemy_OnDie(Enemy enemy)
 {
     enemySoundController.Scream();
     OnEnemyDie?.Invoke(enemy);
 }
Пример #5
0
        protected override void OnDie()
        {
            base.OnDie();

            OnEnemyDie?.Invoke(this, new DieArgs(this));
        }
Пример #6
0
 public void CallOnEnemyDie()
 {
     OnEnemyDie?.Invoke();
 }