Exemplo n.º 1
0
 protected override void LoadContent()
 {
     this.spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
     // Load player resources
     Animation playerAnimation = new Animation();
     Texture2D playerTexture = Game.Content.Load<Texture2D>("shipAnimation");
     Vector2 playerPosition = new Vector2(
         GraphicsDevice.Viewport.TitleSafeArea.X,
         GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2);
     playerAnimation.Initialize(playerTexture, Vector2.Zero,
                                115, 69, 8, 30, Color.White, 1f, true);
     Animation = playerAnimation;
     base.LoadContent();
 }
Exemplo n.º 2
0
 protected override void LoadContent()
 {
     sp = (SpriteBatch) Game.Services.GetService(typeof (SpriteBatch));
     // Load enemy resources
     Texture2D texture = Game.Content.Load<Texture2D>("mineAnimation");
     animation = new Animation();
     animation.Initialize(texture, Vector2.Zero, 47, 61, 8, 30, Color.White, 1f, true);
     base.LoadContent();
 }