示例#1
0
 public void DisplayXPSystem(int xpC)
 {
     xpCount = xpC;
     //xp & level graphics
     linkLevelOffset = game.util.linkXPlevel * storage.digitBuffer;
     linkLevelDigit  = HudFactory.Digit(linkLevelOffset);
     linkLevelDigit.Draw(game.currentRoom.pHUD.linkLevelPos);
     //xp loop:
     for (int i = 0; i < xpCount; i++)
     {
         xpOffset = i * storage.xpBuffer;
         xpSprite.Draw(new Vector2(game.currentRoom.pHUD.xpPos.X, game.currentRoom.pHUD.xpPos.Y - xpOffset));
     }
 }
示例#2
0
        public HUDHelper(ZeldaGame game)
        {
            this.game  = game;
            storage    = new HUDStorage(game);
            HudFactory = game.hudSpriteFactory;

            heartSprite   = HudFactory.livesHUD();
            digit         = HudFactory.Digit(storage.zero);
            minimap       = HudFactory.mapHUD();
            linkIndicator = HudFactory.linkOnMap();
            boss          = HudFactory.compassBoss();

            linkLevelOffset = game.util.linkXPlevel;
            linkLevelDigit  = HudFactory.Digit(linkLevelOffset);

            xpSprite = HudFactory.xpSegment();
        }
示例#3
0
 public void DisplayRupSystem()
 {
     if (game.util.numYrups > game.util.MAX_RUPS)
     {
         game.util.numYrups = game.util.MAX_RUPS;
     }
     //digits:
     yellowOneDigit = game.util.numYrups % storage.ten;
     yellowTenDigit = (game.util.numYrups - yellowOneDigit) / storage.ten;
     //tens place:
     digitOffset = yellowTenDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(game.currentRoom.pHUD.digitYrupPos);
     //ones place:
     digitOffset = yellowOneDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(new Vector2(game.currentRoom.pHUD.digitYrupPos.X + storage.secondDigitBuffer, game.currentRoom.pHUD.digitYrupPos.Y));
 }
示例#4
0
 public void DisplayBombSystem()
 {
     if (game.util.numBombs > game.util.MAX_BOMBS)
     {
         game.util.numBombs = game.util.MAX_BOMBS;
     }
     //digits:
     bombOneDigit = game.util.numBombs % storage.ten;
     bombTenDigit = (game.util.numBombs - bombOneDigit) / storage.ten;
     //tens place:
     digitOffset = bombTenDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(game.currentRoom.pHUD.digitBombPos);
     //ones place:
     digitOffset = bombOneDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(new Vector2(game.currentRoom.pHUD.digitBombPos.X + storage.secondDigitBuffer, game.currentRoom.pHUD.digitBombPos.Y));
 }
示例#5
0
 public void DisplayKeySystem()
 {
     if (game.util.numKeys > game.util.MAX_KEYS)
     {
         game.util.numKeys = game.util.MAX_KEYS;
     }
     //digits:
     keyOneDigit = game.util.numKeys % storage.ten;
     keyTenDigit = (game.util.numKeys - keyOneDigit) / storage.ten;
     //tens place:
     digitOffset = keyTenDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(game.currentRoom.pHUD.digitKeyPos);
     //ones place:
     digitOffset = keyOneDigit * storage.digitBuffer;
     digit       = HudFactory.Digit(digitOffset);
     digit.Draw(new Vector2(game.currentRoom.pHUD.digitKeyPos.X + storage.secondDigitBuffer, game.currentRoom.pHUD.digitKeyPos.Y));
 }