private void OnParticleCollision(GameObject other) { if (--Properties.EnemyHealth <= 0) { Instantiate(enemyDeathFX, this.transform.position, Quaternion.identity); OnGotKilled?.Invoke(this); return; } OnHitByBullet?.Invoke(this); }
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);