Beispiel #1
0
    public void Death()
    {
        OnEntityKilled?.Invoke(this);

        // Instantiate Explosion and Destroy this GameObject
        GameObject explosion = ObjectPool.Instance.GetPooledObject(ObjectPool.PoolType.Explosion, transform.position, Quaternion.identity);

        gameObject.SetActive(false);
    }
Beispiel #2
0
 // IDamageable - Behaviour to run when the Enemy has no health left
 public virtual void Death()
 {
     // Triggers Death Event.
     OnEntityKilled?.Invoke(this);
 }
Beispiel #3
0
 public override void Die(Entity byEntity)
 {
     ConsolePrinter.PrintAction(byEntity, "killed", this, true);
     OnEntityKilled.Invoke(this);
 }