Esempio n. 1
0
        private ISprite MakeCoinSprite(ContentManager content, GraphicsDevice graphics)
        {
            ISprite   sprite;
            Texture2D coin = content.Load <Texture2D>("ItemSpriteSheet");

            sprite = new ItemSprite(graphics, coin, 5, 10, 2, 10);
            sprite.CurrentLocation = new Vector2(Top2ndLeft.X + 112, 1);
            sprite.ScaleSprite(1.5f);

            return(sprite);
        }
Esempio n. 2
0
 public BeginningState(GameMain game)
 {
     Game      = game;
     TextFont  = Game.Content.Load <SpriteFont>("Fonts/File");
     TopCenter = new Vector2(100, 200);
     Peach     = new Peach(Game.Content, Game.GraphicsDevice);
     Peach.Sprite.Acceleration = new Vector2(Constants.ZERO, Constants.ZERO);
     University       = Game.Content.Load <Texture2D>("University");
     UniversitySprite = new ItemSprite(Game.GraphicsDevice, University, 1, 1, Constants.ZERO, 1);
     UniversitySprite.CurrentLocation = new Vector2(500, 500);
     Logo       = Game.Content.Load <Texture2D>("IntroLogo");
     LogoSprite = new ItemSprite(Game.GraphicsDevice, Logo, 1, 18, Constants.ZERO, 18);
     LogoSprite.CurrentLocation = new Vector2(600, 400);
     LogoSprite.ScaleSprite(4f);
     LogoSprite.LoopFrame = true;
     Peach.Location       = new Vector2(Constants.ZERO, 930);
     TimeRemaining        = Constants.TIMER_BEGINNING;
     passedSeconds        = Constants.ZERO;
 }