Exemplo n.º 1
0
    public sealed override void Destroy()
    {
        if (destroyed)
        {
            return;
        }

        DispatchEvent(Events.ON_DESTROY);

        if (updating)
        {
            pendingDestroy = true; return;
        }

        OnDestroy();

        base.Destroy();

        ObjectManager.BackReusedID(this);

        name      = string.Empty;
        updating  = false;
        m_guid.id = 0;

        m_pool.GetDefault(m_hash).Back(this);
    }