Beispiel #1
0
 public GunExperienceHud(ContentManager Content)
 {
     experienceBarSprite = new Sprite(Content, SpriteName,
         Units.GameToPixel(ExperienceBarSourceX), Units.GameToPixel(ExperienceBarSourceY),
         Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     levelSprite = new Sprite(Content, SpriteName,
         Units.TileToPixel(LevelSourceX), Units.GameToPixel(LevelSourceY),
         Units.TileToPixel(LevelSourceWidth), Units.GameToPixel(LevelSourceHeight));
     flashSprite = new Sprite(Content, SpriteName,
         Units.GameToPixel(FlashSourceX), Units.TileToPixel(FlashSourceY),
         Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     fillSprite = new VaryingWidthSprite(Content, SpriteName,
         Units.TileToPixel(FillSourceX), Units.TileToPixel(FillSourceY),
         Units.GameToPixel(ExperienceBarSourceWidth), 0,
         Units.GameToPixel(ExperienceBarSourceHeight));
     maxSprite = new Sprite(Content, SpriteName,
         Units.GameToPixel(MaxSourceX), Units.GameToPixel(MaxSourceY),
         Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     flashTimer = new Timer(FlashTime);
     number = NumberSprite.HudNumber(Content, 0, 2);
 }
Beispiel #2
0
 public GunExperienceHud(ContentManager Content)
 {
     experienceBarSprite = new Sprite(Content, SpriteName,
                                      Units.GameToPixel(ExperienceBarSourceX), Units.GameToPixel(ExperienceBarSourceY),
                                      Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     levelSprite = new Sprite(Content, SpriteName,
                              Units.TileToPixel(LevelSourceX), Units.GameToPixel(LevelSourceY),
                              Units.TileToPixel(LevelSourceWidth), Units.GameToPixel(LevelSourceHeight));
     flashSprite = new Sprite(Content, SpriteName,
                              Units.GameToPixel(FlashSourceX), Units.TileToPixel(FlashSourceY),
                              Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     fillSprite = new VaryingWidthSprite(Content, SpriteName,
                                         Units.TileToPixel(FillSourceX), Units.TileToPixel(FillSourceY),
                                         Units.GameToPixel(ExperienceBarSourceWidth), 0,
                                         Units.GameToPixel(ExperienceBarSourceHeight));
     maxSprite = new Sprite(Content, SpriteName,
                            Units.GameToPixel(MaxSourceX), Units.GameToPixel(MaxSourceY),
                            Units.GameToPixel(ExperienceBarSourceWidth), Units.GameToPixel(ExperienceBarSourceHeight));
     flashTimer = new Timer(FlashTime);
     number     = NumberSprite.HudNumber(Content, 0, 2);
 }