public void Update()
 {
     this.offset = game.hud.offset;
     if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Bomb"))
     {
         currentSprite = ItemSpriteFactory.GetBomb();
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Boomerang"))
     {
         currentSprite = ItemSpriteFactory.GetBoomerang();
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Arrow"))
     {
         currentSprite = ItemSpriteFactory.GetArrow();
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.BlueCandle"))
     {
         currentSprite       = ItemSpriteFactory.GetBlueCandle();
         currentSprite.Scale = 2;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.BluePotion"))
     {
         currentSprite = ItemSpriteFactory.GetBluePotion();
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.RedPotion"))
     {
         currentSprite = ItemSpriteFactory.GetRedPotion();
     }
     currentSprite.X = 257;
     currentSprite.Y = offset + 55;
 }
Beispiel #2
0
 public PlacedBomb(IProjectileManager projectiles, int x = 0, int y = 0)
     : base(x, y, 0, 0, Team.Link)
 {
     sprite           = ItemSpriteFactory.GetBomb();
     X                = x;
     Y                = y;
     timer            = 60;
     this.projectiles = projectiles;
     Hitbox           = new Rectangle(X, Y, 0, 0);
 }
 public void Update()
 {
     currentDelay++;
     if (currentDelay == totalDelay)
     {
         selector.Update();
         currentDelay = 0;
     }
     if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Bomb"))
     {
         currentSprite = ItemSpriteFactory.GetBomb();
         selector.X    = bomb.X;
         selector.Y    = bomb.Y;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Boomerang"))
     {
         currentSprite = ItemSpriteFactory.GetBoomerang();
         selector.X    = boomerang.X;
         selector.Y    = boomerang.Y;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.Arrow"))
     {
         currentSprite = ItemSpriteFactory.GetArrow();
         selector.X    = arrow.X;
         selector.Y    = arrow.Y;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.BlueCandle"))
     {
         currentSprite       = ItemSpriteFactory.GetBlueCandle();
         currentSprite.Scale = 2;
         selector.X          = blueCandle.X;
         selector.Y          = blueCandle.Y;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.BluePotion"))
     {
         currentSprite = ItemSpriteFactory.GetBluePotion();
         selector.X    = bluePotion.X;
         selector.Y    = bluePotion.Y;
     }
     else if (game.Link.CurrentItem.ToString().Equals("LegendOfZelda.RedPotion"))
     {
         currentSprite = ItemSpriteFactory.GetRedPotion();
         selector.X    = redPotion.X;
         selector.Y    = redPotion.Y;
     }
     currentSprite.X = currentSpriteX;
     currentSprite.Y = firstRowY - smallDiff;
     selector.X      = selector.X - smallDiff;
 }
 public InventIcons(LegendOfZelda game)
 {
     itemDiff         = 40;
     smallDiff        = 5;
     firstRowY        = 75;
     secondRowY       = 105;
     bowDiff          = 15;
     mapCompassX      = 100;
     mapY             = 220;
     compassY         = 300;
     currentSpriteX   = 145;
     initX            = 275;
     this.game        = game;
     this.inventory   = game.Link.Inventory;
     boomerang        = ItemSpriteFactory.GetBoomerang();
     boomerang.X      = initX;
     boomerang.Y      = firstRowY;
     bomb             = ItemSpriteFactory.GetBomb();
     bomb.X           = boomerang.X + itemDiff;
     bomb.Y           = firstRowY - smallDiff;
     arrow            = ItemSpriteFactory.GetArrow();
     arrow.X          = bomb.X + itemDiff;
     arrow.Y          = bomb.Y;
     bow              = ItemSpriteFactory.GetBow();
     bow.X            = arrow.X + bowDiff;
     bow.Y            = arrow.Y;
     blueCandle       = ItemSpriteFactory.GetBlueCandle();
     blueCandle.Scale = 2;
     blueCandle.X     = arrow.X + itemDiff + smallDiff;
     blueCandle.Y     = arrow.Y;
     bluePotion       = ItemSpriteFactory.GetBluePotion();
     bluePotion.X     = bow.X;
     bluePotion.Y     = secondRowY;
     redPotion        = ItemSpriteFactory.GetRedPotion();
     redPotion.X      = bluePotion.X;
     redPotion.Y      = bluePotion.Y;
     map              = ItemSpriteFactory.GetMap();
     map.X            = mapCompassX;
     map.Y            = mapY;
     currentSprite    = FontSpriteFactory.GetWhiteBox();
     compass          = ItemSpriteFactory.GetCompass();
     compass.X        = mapCompassX;
     compass.Y        = compassY;
     selector         = ItemSpriteFactory.GetItemSelector();
     currentDelay     = 0;
     totalDelay       = smallDiff;
 }
Beispiel #5
0
 public RedRing(IDictionary <int, IPlayer> players)
 {
     sprite       = ItemSpriteFactory.GetRedRing();
     Hitbox       = sprite.Box;
     this.players = players;
 }
Beispiel #6
0
 public Heart()
 {
     sprite = ItemSpriteFactory.GetHeart();
     Hitbox = sprite.Box;
 }
Beispiel #7
0
 public Clock(IDictionary <int, IPlayer> players)
 {
     sprite       = ItemSpriteFactory.GetClock();
     Hitbox       = sprite.Box;
     this.players = players;
 }