public Player(frmSpaceGame form) { this.form = form; Speed = 5; PlayerShips = new List <PictureBox>(); Init(); }
public Laser(frmSpaceGame form) { this.form = form; Speed = 5; this.laser = new PictureBox(); Init(); }
public static void CalculateScore(PictureBox enemy, frmSpaceGame form) { if (enemy.BackColor == Color.Blue) { TotalScore += 1; } else if (enemy.BackColor == Color.Red) { TotalScore += 2; } form.Text = "Score: " + TotalScore; }
public Enemy(frmSpaceGame form) { rand = new Random(); this.form = form; enemies = new List <PictureBox>(); enemy = new PictureBox() { BackColor = GetColor(rand.Next(1, 3)), Width = rand.Next(30, 50), Height = rand.Next(30, 50), Tag = "Enemy", Visible = true }; Init(); }