예제 #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);
    }
예제 #2
0
 // IDamageable - Behaviour to run when the Enemy has no health left
 public virtual void Death()
 {
     // Triggers Death Event.
     OnEntityKilled?.Invoke(this);
 }
예제 #3
0
 public override void Die(Entity byEntity)
 {
     ConsolePrinter.PrintAction(byEntity, "killed", this, true);
     OnEntityKilled.Invoke(this);
 }