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)); } }
public ItemSelectState(ZeldaGame game) { this.storage = new ItemSelectStateStorage(); this.game = game; game.spriteSheets.TryGetValue("HUD", out inventorySpriteSheet); HudFactory = game.hudSpriteFactory; top = new UniversalSprite(game, inventorySpriteSheet, storage.topRectangle, Color.White, SpriteEffects.None, new Vector2(1, 1), storage.fpsLimiter, itemDepth); mid = new UniversalSprite(game, inventorySpriteSheet, storage.midRectangle, Color.White, SpriteEffects.None, new Vector2(1, 1), storage.fpsLimiter, itemDepth); holdingMap = new UniversalSprite(game, inventorySpriteSheet, storage.mapRectangle, Color.White, SpriteEffects.None, new Vector2(1, 1), storage.fpsLimiter, itemDepth); holdingCompass = new UniversalSprite(game, inventorySpriteSheet, storage.compassRectangle, Color.White, SpriteEffects.None, new Vector2(1, 1), storage.fpsLimiter, itemDepth); pHUD = game.currentRoom.pHUD; secweaponHolding = HudFactory.blankBox(); secweaponOne = HudFactory.blankBox(); secweaponTwo = HudFactory.blankBox(); secweaponThree = HudFactory.blankBox(); }
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(); }
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)); }
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)); }
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)); }
void IGameState.Update() { pHUD = game.currentRoom.pHUD; pHUD.Update(); game.util.inSelect = true; if (game.util.selectSpeed < 0) { if (pHUD.hudPosition.Y > storage.hudTopPos) { ItemScreenPositionalUpdate(game.util.selectSpeed); } else { game.currentGameState = game.currentMainGameState; game.util.inSelect = false; } } else { if (pHUD.hudPosition.Y < storage.hudBotPos) { ItemScreenPositionalUpdate(game.util.selectSpeed); } } game.controllerList[0].Update(); game.controllerList[2].Update(); secweaponHolding = HudFactory.secondaryWeaponHUD(); switch (game.link.linkState.weaponSelected) { case LinkStateMachine.Weapon.bomb: secweaponOne = HudFactory.blankBox(); secweaponTwo = HudFactory.staticBoomerang(); if (game.util.hasBow) { secweaponThree = HudFactory.staticBow(); } else { secweaponThree = HudFactory.blankBox(); } break; case LinkStateMachine.Weapon.boomerang: secweaponOne = HudFactory.staticBomb(); secweaponTwo = HudFactory.blankBox(); if (game.util.hasBow) { secweaponThree = HudFactory.staticBow(); } else { secweaponThree = HudFactory.blankBox(); } break; case LinkStateMachine.Weapon.arrow: secweaponOne = HudFactory.staticBomb(); secweaponTwo = HudFactory.staticBoomerang(); if (game.util.hasBow) { secweaponThree = HudFactory.blankBox(); } break; default: break; } }
public void Update() { xpCount = game.util.numXP % game.util.XPPerLevel; secWeapSprite = HudFactory.secondaryWeaponHUD(); helper.minimapCorrespondence(); }