Ejemplo n.º 1
0
        private void Initialize()
        {
            Equipment = new CharacterEquipment(this);
            Inventory = new SlotContainer <ContainedSlot>(this, new Vector2I(7, 5));

            Equipment.ItemTaken     += EquipmentOnItemEvent;
            Equipment.ItemPut       += EquipmentOnItemEvent;
            Equipment.ItemExchanged += EquipmentOnItemEvent;

            Inventory.ItemTaken     += EquipmentOnItemEvent;
            Inventory.ItemPut       += EquipmentOnItemEvent;
            Inventory.ItemExchanged += EquipmentOnItemEvent;

            // we need to have single id scope with two of these containers
            Equipment.JoinIdScope(Inventory);
            Inventory.JoinIdScope(Equipment);
        }