예제 #1
0
        public void Draw()
        {
            Background.Draw(_location);
            CursorGrid.Draw(CursorSize * _cursorPosition.ToVector2() + GridLocation + _location);
            _selectedItem?.Draw(_location + SelectedItemLocation);

            var dungeonManager = (DungeonManager)_agent.DungeonManager;
            var currentRoom    = _agent.DungeonManager.CurrentRoom.ToVector2();
            var visitedRooms   = dungeonManager.VisitedRooms;

            if (dungeonManager.CurrentRoomMapped)
            {
                PlayerMapDot.Draw(MapGridCoverSize * currentRoom + MapGridLocation + _location);
            }

            for (var row = 0; row < visitedRooms.Length; row++)
            {
                for (var col = 0; col < visitedRooms[row].Length; col++)
                {
                    if (!visitedRooms[row][col])
                    {
                        RoomCover.Draw(MapGridCoverSize * new Vector2(col, row) + MapGridLocation + _location);
                    }
                }
            }

            if (_agent.Player.Inventory.HasMap)
            {
                Map.Draw(MapLocation + _location);
            }
            if (_agent.Player.Inventory.HasCompass)
            {
                Compass.Draw(CompassLocation + _location);
            }
            if (_agent.Player.Inventory.HasArrow)
            {
                Arrow.Draw(ArrowLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.HasBow)
            {
                Bow.Draw(BowLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.HasBoomerang)
            {
                Boomerang.Draw(BoomerangLocation + GridLocation + _location);
            }
            if (_agent.Player.Inventory.BombCount >= 1)
            {
                Bomb.Draw(BombLocation + GridLocation + _location);
            }
        }
예제 #2
0
        public void Draw()
        {
            Background.Draw(_location);
            if (_selectedItem != null)
            {
                if (_selectedItem.Width > 8)
                {
                    _selectedItem.Draw(_location + SelectedItemLocation16_16);
                }
                else
                {
                    _selectedItem.Draw(_location + SelectedItemLocation8_16);
                }
            }

            if (_agent.Player.Inventory.HasBoomerang)
            {
                Boomerang.Draw(BoomerangLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.BombCount >= 1)
            {
                Bomb.Draw(BombLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.ArrowLevel == Secondary.SilverArrow)
            {
                SilverArrow.Draw(ArrowLocation + GridLocation + _location);
            }
            else if (_agent.Player.Inventory.ArrowLevel == Secondary.Arrow)
            {
                Arrow.Draw(ArrowLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.BowLevel == Secondary.FireBow)
            {
                FireBow.Draw(BowLocation + GridLocation + _location);
            }
            else if (_agent.Player.Inventory.BowLevel == Secondary.Bow)
            {
                Bow.Draw(BowLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.Coins >= 2)
            {
                AlchemyCoin.Draw(CoinLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.HasATWBoomerang)
            {
                ATWBoomerang.Draw(ATWBoomerangLocation + GridLocation + _location);
            }

            if (_agent.Player.Inventory.HasBombLauncher)
            {
                BombLauncher.Draw(BombLauncherLocation + GridLocation + _location);
            }

            DrawExtraItem(_slot7Sprite, Slot7Location);
            DrawExtraItem(_slot8Sprite, Slot8Location);

            CursorGrid.Draw(CursorSize * _cursorPosition.ToVector2() + GridLocation + _location);
        }