public Cooperative() { InitializeComponent(); missles = new List <Weapon>(); asteroids = new List <Asteroid>(); ammunition = new List <Ammo>(); extralives = new List <Live>(); player1 = new Player(playerSize, numberOfPositions, numberOfLives, 1); // create player 1 player1.InitializeSprite(); player2 = new Player(playerSize, numberOfPositions, numberOfLives, 2); // create player 2 player2.InitializeSprite(); asteroidFactory = new AsteroidFactory(asteroidSize, asteroidSpeed, numberOfPositions); numberOfLivesLabel.Text = String.Format("x {0}", player1.Lives); scoreLabel.Text = String.Format("SCORE : {0:D2}", player1.Score); missleAmmoLabel1.Text = Convert.ToString(missleAmmo1); laserAmmoLabel1.Text = Convert.ToString(laserAmmo1); numberOfLivesLabel1.Text = String.Format("x {0}", player2.Lives); scoreLabel1.Text = String.Format("SCORE : {0:D2}", player2.Score); missleAmmoLabel2.Text = Convert.ToString(missleAmmo2); laserAmmoLabel2.Text = Convert.ToString(laserAmmo2); Controls.Add(player1.Sprite); Controls.Add(player2.Sprite); }
public Client(string userName) { InitializeComponent(); missles = new List <Missle>(); asteroids = new List <Asteroid>(); player = new Player(playerSize, numberOfPositions, numberOfLives, userName); player.InitializeSprite(); asteroidFactory = new AsteroidFactory(asteroidSize, asteroidSpeed, numberOfPositions); numberOfLivesLabel.Text = String.Format("Number of lives = {0}", player.Lives); scoreLabel.Text = String.Format("Score = {0:D2}", player.Score); Controls.Add(player.Sprite); }
public Client(string userName) { InitializeComponent(); ammo = new List <Weapon>(); asteroids = new List <Asteroid>(); ammunition = new List <Ammo>(); extralives = new List <Live>(); player = new Player(playerSize, numberOfPositions, numberOfLives, userName); player.InitializeSprite(); asteroidFactory = new AsteroidFactory(asteroidSize, asteroidSpeed, numberOfPositions); numberOfLivesLabel.Text = String.Format("x {0}", player.Lives); scoreLabel.Text = String.Format("SCORE : {0:D2}", player.Score); missleAmmoLabel.Text = Convert.ToString(missleAmmo); laserAmmoLabel.Text = Convert.ToString(laserAmmo); Controls.Add(player.Sprite); }
public Cooperative() { InitializeComponent(); missles = new List <Missle>(); asteroids = new List <Asteroid>(); player1 = new Player(playerSize, numberOfPositions, numberOfLives, 1); // create player 1 player2 = new Player(playerSize, numberOfPositions, numberOfLives, 2); // create player 2 asteroidFactory = new AsteroidFactory(asteroidSize, asteroidSpeed, numberOfPositions); numberOfLivesLabel.Text = String.Format("Lives = {0}", player1.Lives); scoreLabel.Text = String.Format("Score = {0:D2}", player1.Score); numberOfLivesLabel1.Text = String.Format("Lives = {0}", player2.Lives); scoreLabel1.Text = String.Format("Score = {0:D2}", player2.Score); Controls.Add(player1.Sprite); Controls.Add(player2.Sprite); }