Пример #1
0
 public PlayerStatusState(MarioGame game)
 {
     this.game           = game;
     game.IsMouseVisible = false;
     game.DisableController();
     graphicsDevice      = game.GraphicsDevice;
     spriteFont          = game.Content.Load <SpriteFont>(StringConsts.MarioFont);
     smallMarioSprite    = SpriteFactory.CreateSprite(nameof(SmallMario) + nameof(RightIdle));
     game.IsMouseVisible = false;
 }
Пример #2
0
 public TeleportingState(MarioGame game, Vector2 Position)
 {
     game.DisableController();
     this.game      = game;
     graphicsDevice = game.GraphicsDevice;
     MediaPlayer.Stop();
     AudioFactory.Instance.CreateSound(StringConsts.Pipe).Play();
     if (game.Player.Position.Y < 0)
     {
         backGroundColor = Color.Black;
     }
     teleportPosition = Position;
 }