Exemplo n.º 1
0
    public virtual void OnDeath()
    {
        if (destructed != null)
        {
            destructed();
        }

        RegisteredObject.Destroy(gameObject);
    }
Exemplo n.º 2
0
    public void OnTriggerEnter2D(Collider2D col)
    {
        Player p = col.GetComponent <Player> ();

        if (p != null)
        {
            Apply(p.Data);
            //TODO play pickup sound?
            RegisteredObject.Destroy(gameObject);
        }
    }
Exemplo n.º 3
0
    // This Entity has died
    public void OnDeath()
    {
        foreach (Status s in statuses.Values)
        {
            s.OnDeath(this);
        }

        if (died != null)
        {
            died();
        }

        RegisteredObject.Destroy(gameObject);
    }
Exemplo n.º 4
0
 protected override void Apply(Entity e)
 {
     GameManager.instance.unlockAbility(abilData);
     RegisteredObject.Destroy(gameObject);
 }