Esempio n. 1
0
 private void OnParticleCollision(GameObject other)
 {
     if (--Properties.EnemyHealth <= 0)
     {
         Instantiate(enemyDeathFX, this.transform.position, Quaternion.identity);
         OnGotKilled?.Invoke(this);
         return;
     }
     OnHitByBullet?.Invoke(this);
 }
Esempio n. 2
0
 public void KillThis()
 {
     OnGotKilled?.Invoke();
     OnSpawnBonus?.Invoke();
     gameObject.SetActive(false);
 }
 public void GotKilled(Hero victimHero, Agent victimAgent, Hero attackerHero, Agent attackerAgent, AgentState agentState, KillingBlow blow)
 => OnGotKilled?.Invoke(victimHero, victimAgent, attackerHero, attackerAgent, agentState, blow);