Beispiel #1
0
        public void Render(IGameRenderService gameService)
        {
            gameService.DrawRect(_topLeft, _topLeft.Add(_inventory.MaxInventoryItems, 1), Enums.Colors.White, true);
            gameService.DrawToScreen(_topLeft.Add(0, -0.2), 20, "Inventory:");

            if (_inventory == null)
            {
                return;
            }

            for (var i = -1; i < _inventory.MaxInventoryItems; i++)
            {
                _inventory.GetItem(i)?.Draw(gameService, _topLeft.Add(i + 1, 0));
            }
        }
Beispiel #2
0
        public void Render(IGameRenderService gameService)
        {
            uint lineHeight   = 18;
            var  basePosition = _drawPos.Add(0, -1);

            gameService.DrawToScreen(basePosition, lineHeight, "The current keyboard readout:");
            gameService.DrawToScreen(basePosition.Add(0, -0.5), lineHeight, $"Escape Key: {_escape}");
            gameService.DrawToScreen(basePosition.Add(0, -1), lineHeight, $"Left Key: {_left}");
            gameService.DrawToScreen(basePosition.Add(0, -1.5), lineHeight, $"Right Key: {_right}");
            gameService.DrawToScreen(basePosition.Add(0, -2), lineHeight, $"Up Key: {_up}");
            gameService.DrawToScreen(basePosition.Add(0, -4), lineHeight, $"Game Position: {_lastPosition}");
        }
 public void Draw(IGameRenderService gameService, Position pos)
 {
     gameService.DrawImage(pos, IconPath);
     gameService.DrawToScreen(pos.Add(0.9, 0.9), 12, Enums.Colors.White, _stackSize.ToString(), true);
 }
 public void Render(IGameRenderService gameService)
 {
     gameService.DrawToScreen(_position, 18, $"{FPS}", true);
 }