Ejemplo n.º 1
0
    public void SetInventory(IInventory inventory)
    {
        if (this.inventory != null)
        {
            this.inventory.RemoveOnChangedListener(OnInventoryChanged);
        }

        this.inventory = inventory;
        inventory.AddOnChangedListener(OnInventoryChanged);
    }