Exemplo n.º 1
0
        public void Draw()
        {
            Background.Draw(_location);

            if (_agent.Player.Inventory.HasMap)
            {
                MiniMap.Draw(MiniMapLocation + _location);
            }
            if (_agent.Player.Inventory.HasCompass)
            {
                TriforceDot.Draw(MiniMapLocation + TriforceLocation + _location);
            }

            var dungeonManager = (DungeonManager)_agent.DungeonManager;

            if (dungeonManager.CurrentRoomMapped)
            {
                PlayerDot.Draw(MiniMapLocation + LinkLocation + _location);
            }

            Primary?.Draw(PrimaryLocation + _location);
            Secondary?.Draw(SecondaryLocation + _location);

            int i;

            for (i = 0; i < _agent.Player.Health / 2; i++)
            {
                Heart.Draw(HeartsLocation + _location + HeartOffset * i);
            }

            if (_agent.Player.Health % 2 != 0)
            {
                HalfHeart.Draw(HeartsLocation + _location + HeartOffset * i);
                i++;
            }

            for (; i < _agent.Player.MaxHealth / 2; i++)
            {
                EmptyHeart.Draw(HeartsLocation + _location + HeartOffset * i);
            }

            _rupeeCount.Draw();
            _bombCount.Draw();
            _keyCount.Draw();
        }
Exemplo n.º 2
0
        public void Draw()
        {
            Background.Draw(_location);

            var inv = _agent.Player.Inventory;

            Primary?.Draw(PrimaryLocation + _location);
            switch (inv.SecondaryItem)
            {
            case Items.Secondary.Coins:
            case Items.Secondary.ExtraSlot1 when inv.ExtraItem1 == Items.Secondary.Clock || inv.ExtraItem1 == Items.Secondary.Star:
            case Items.Secondary.ExtraSlot2 when inv.ExtraItem2 == Items.Secondary.Clock || inv.ExtraItem2 == Items.Secondary.Star:
                Secondary?.Draw(SecondaryLocation16_16 + _location);
                break;

            default:
                Secondary?.Draw(SecondaryLocation8_16 + _location);
                break;
            }

            int i;

            for (i = 0; i < _agent.Player.Health / 2; i++)
            {
                Heart.Draw(HeartsLocation + _location + HeartOffset * i);
            }

            if (_agent.Player.Health % 2 != 0)
            {
                HalfHeart.Draw(HeartsLocation + _location + HeartOffset * i);
                i++;
            }

            for (; i < _agent.Player.MaxHealth / 2; i++)
            {
                EmptyHeart.Draw(HeartsLocation + _location + HeartOffset * i);
            }

            _rupeeCount.Draw();
            _bombCount.Draw();
            _keyCount.Draw();
            _score.Draw();
        }