public SpriteExplosion(Texture2D explosion, Vector2 position, string metadataFile) : base(explosion, position) { animation = new SpriteStrip(); animation.Initialize(explosion, position, new SpriteStripMetadata(metadataFile)); }
public SpriteExplosion(Texture2D explosion, Vector2 position, SpriteStripMetadata metadata) : base(explosion, position) { animation = new SpriteStrip(); animation.Initialize(explosion, position, metadata); }
public override void LoadContent() { #if !MONOMAC notificationAnimationMetadata = new SpriteStripMetadata("./Resources/Animations/HDDACCESSINDICATOR.ini"); #else notificationAnimationMetadata = new SpriteStripMetadata("./Content/Animations/HDDACCESSINDICATOR.ini"); #endif Vector2 centerOfScreen = new Vector2(ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Center.X, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Center.Y); ContentManager content = ScreenManager.Game.Content; notificationAnimationTexture = content.Load<Texture2D>("./Animations/HDDACCESSINDICATOR"); notificationAnimation = new SpriteStrip(); notificationAnimation.Initialize(notificationAnimationTexture, centerOfScreen, notificationAnimationMetadata); //notificationAnimation.Initialize(notificationAnimationTexture, centerOfScreen, 128, 128, 30, 30, Color.White, 1.0f, true); notificationFont = content.Load<SpriteFont>("./Fonts/ConsoleFont"); }