Beispiel #1
0
    private void DetonateTrap(int actorID, int itemID)
    {
        var trap = this.EntityManager.GetComponent <TrapComponent>(itemID);

        if (trap == null)
        {
            return;
        }

        trap.Effect.Location = trap.FormParent.Position_Center; // Location is unset until detonation because a trap on a chest can move

        EffectSystem.CreateEffectEntity(this.EntityManager, trap.Effect);

        RemoveTrap(itemID, trap);
    }