Esempio n. 1
0
 public Coin(Game1 game, Vector2 location)
 {
     MyGame          = game;
     Sprite          = SpriteFactory.CreateCoin();
     MyGame.Sprite   = this.Sprite;
     playSoundEffect = false;
     HasBeenUsed     = false;
     Location        = location;
 }
Esempio n. 2
0
 public PlayerStatistic(SpriteBatch spritePatch, ContentManager content)
 {
     spriteBatch       = spritePatch;
     playSoundEffect   = false;
     outOfTimeEffect   = false;
     command           = new ResetCommand(Game1.GetInstance);
     gameTimeCounter   = 0;
     textFont          = content.Load <SpriteFont>("TextFont");
     position          = new Vector2(400, 22);
     displayPos        = new Vector2();
     displayVelocity   = new Vector2(0, -2);
     headerKeywords    = "MARIO                                  WORLD             TIME";
     endGame           = false;
     coinTexture       = SpriteFactory.CreateCoin();
     flagScore         = "5000";
     score             = 0;
     coin              = 0;
     time              = 400;
     displayScore      = "";
     headerVariables   = FormatString(score, 6) + "             x" + FormatString(coin, 2) + "                   1-1                  " + FormatString(time, 3);
     counterForEndGame = 0;
 }