public Unit_Drop_ChocolateBall(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch, sourceEnemy) { icon = content.Load<Texture2D>("ChocolateBall"); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Drop_ChocolateBall(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch, sourceEnemy) { icon = content.Load <Texture2D>("ChocolateBall"); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Drop_PowerUp(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy, int type) : base(game, spriteBatch, sourceEnemy) { // type of powerup powerUp = (POWERUP)type; icon = content.Load <Texture2D>("P_" + type); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Drop_PowerUp(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy, int type) : base(game, spriteBatch, sourceEnemy) { // type of powerup powerUp = (POWERUP)type; icon = content.Load<Texture2D>("P_" + type); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Animated_Explosion(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch) { int xFrames = 12; int xFps = 60; icon = content.Load<Texture2D>("Explosion"); animationSettings = new AnimationSettings(icon.Width / xFrames, icon.Height, xFrames, xFps, true); currentFrameIndex = 1; prevFrameTime = TimeSpan.Zero; frameTime = TimeSpan.FromSeconds((double)xFrames / (double)xFps); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Animated_Explosion(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch) { int xFrames = 12; int xFps = 60; icon = content.Load <Texture2D>("Explosion"); animationSettings = new AnimationSettings(icon.Width / xFrames, icon.Height, xFrames, xFps, true); currentFrameIndex = 1; prevFrameTime = TimeSpan.Zero; frameTime = TimeSpan.FromSeconds((double)xFrames / (double)xFps); // center on source enemy position.X = (sourceEnemy.Position.X + sourceEnemy.Width / 2) - Width / 2; position.Y = (sourceEnemy.Position.Y + sourceEnemy.Height / 2) - Height / 2; }
public Unit_Drop(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch) { speed = sourceEnemy.Speed / 2; screenHeight = Settings.Viewport.Height; }
public Unit_Drop(Game game, SpriteBatch spriteBatch, Unit_Enemy sourceEnemy) : base(game, spriteBatch) { speed = sourceEnemy.Speed / 2; screenHeight = Settings.Viewport.Height; }