Example #1
0
        public InventoryCursor(InventoryMenu menu) : base(menu)
        {
            _visualizer = new ItemContainerVisualizer(menu, menu.cursorItemContainer);
            _inspector  = new ItemInspector(menu);

            AddElement(_visualizer);
            AddElement(_inspector);
        }
Example #2
0
        public ItemSlot(InventoryMenu menu, ItemContainer itemContainer) : base(menu, string.Empty, null, false)
        {
            _itemContainer = itemContainer;

            position = position;
            size     = Vector2.one * 24f;

            _visualizer = new ItemContainerVisualizer(menu, itemContainer);
            AddElement(_visualizer);
        }
Example #3
0
        public PlayerInterface(Player player) : base()
        {
            _player = player;

            _itemSelect    = new ItemSelect(this);
            _inventoryMenu = new InventoryMenu(this);

            _playerCommand = new CommandDelegate();

            _playerCommand.Add("inventory", new CommandCallback(delegate
            {
                if (_inventoryMenu.activated)
                {
                    _inventoryMenu.RequestTerminate();
                }
                else
                {
                    AddSubLoopFlow(_inventoryMenu);
                }
            }));
        }