/// <summary> /// AlienSquad's constructor. /// </summary> /// <param name="game">The game it is attached to.</param> /// <param name="bomb">The bombs dropped by the aliens.</param> public AlienSquad(Game1 game, BombFactory bomb, LaserFactory laser) : base(game) { this.game = game; this.bomb = bomb; laser.AlienKilled += onAlienHit; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
/// <summary> /// constructor for the alienSquad which are rows of aliens /// </summary> /// <param name="game"></param> public AlienSquad(Game1 game, int numAliens, BombFactory bombFactory) : base(game) { this.game = game; this.numAlien = numAliens; squads = new AlienSprite[numAlien, 12]; this.bombFactory = bombFactory; }
/// <summary> /// AlienSprite's constructor. Creates an alien with an image, /// starting at the specified position. /// </summary> /// <param name="game">The game it is attached to.</param> /// <param name="imageAlien">The image representing the alien.</param> /// <param name="positionX">The X position of the alien.</param> /// <param name="positionY">The Y position of the alien.</param> public MotherShipSprite(Game1 game,BombFactory bomb, LaserFactory laser) : base(game) { this.game = game; this.bomb = bomb; this.Point = 100; laser.MotherShipHit += onShipHit; AlienSquad.NewWave += onNewWave; }
public ProjectileSprite(Game1 game, Vector2 start, Texture2D imageBullet, Vector2 velocity, ScoreSprite score) : base(game) { this.game = game; this.start = start; this.imageBullet = imageBullet; this.velocity = velocity; this.over = score; // TODO: Construct any child components here }
/// <summary> /// The BombFactory's constructor. /// </summary> /// <param name="game">The game it is attached to.</param> public BombFactory(Game1 game, Texture2D imageProjectile, int damage, float velocity) : base(game) { this.game = game; this.imageProjectile = imageProjectile; AlienSquad.NewWave += onNewWave; this.damage = damage; this.velocity = velocity; }
/// <summary> /// AlienSprite's constructor. Creates an alien with an image, /// starting at the specified position. /// </summary> /// <param name="game">The game it is attached to.</param> /// <param name="imageAlien">The image representing the alien.</param> /// <param name="positionX">The X position of the alien.</param> /// <param name="positionY">The Y position of the alien.</param> public AlienSprite(Game1 game, Texture2D imageAlien, int positionX, int positionY, int point) : base(game) { this.game = game; this.imageAlien = imageAlien; this.positionX = positionX; this.positionY = positionY; this.Point = point; }
/// <summary> /// ScoreSprite's constructor. /// </summary> /// <param name="game">The game</param> public ScoreSprite(Game1 game, LaserFactory laser, BombFactory bomb, BombFactory motherShipBomb, BombFactory bonusBomb) : base(game) { this.game = game; bomb.PlayerHit += onPlayerHit; motherShipBomb.PlayerHit += onPlayerHit; bonusBomb.PlayerHit += onPlayerHit; laser.AlienKilled += onAlienHit; laser.MotherShipHit += onAlienHit; AlienSquad.NewWave += onNewWave; }
static void Main() { using (var game = new Game1()) game.Run(); }
/// <summary> /// ProjectileFactory's constructor. /// </summary> /// <param name="game"></param> public ProjectileFactory(Game1 game) : base(game) { this.game = game; AlienSquad.NewWave += onNewWave; }
/// <summary> /// LaserFactory's constructor. /// </summary> /// <param name="game">The game it is attached to.</param> public LaserFactory(Game1 game) : base(game) { this.game = game; }
/// <summary> /// Creates a bonus with a specified bomb. /// </summary> /// <param name="game">The game</param> /// <param name="bomb">Its bomb</param> public Bonus(Game1 game, BombFactory bomb) : base(game) { this.game = game; this.bomb = bomb; }
//private List<Buncker> bunker; public ProjectileFactory(Game1 game) : base(game) { this.game = game; }
/// <summary> /// PlayerSprite's constructor. /// </summary> /// <param name="game">The game it is attached to.</param> /// <param name="laser">The player's laser.</param> public PlayerSprite(Game1 game, LaserFactory laser) : base(game) { this.game = game; this.laser = laser; }
public BombFactory(Game1 game) : base(game) { this.game = game; }
public ScoreSprite(Game1 game) : base(game) { this.game = game; }