private void Game_Load(object sender, EventArgs e) { PB.Left = 0; PB.Top = 0; Butt.Left = (PB.Width / 2) - (Butt.Width / 2); Butt.Top = PB.Height / 4; Start("S"); SuccessFaillbl.Hide(); SuccessFaillbl.Left = 0; SuccessFaillbl.Top = (Moonscape.Height / 2) - (SuccessFaillbl.Height / 2); CapsName = fuelnum.Cap; TotalFuel = fuelnum.TotalF; FuelBar.Maximum = TotalFuel; Pad.Top = Moonscape.Height - Pad.Height; Lander.Top = 0; }
void Checkcol() //Checks if The lander, when it reaches bottem has landed on the pad or not, and applys the correct message accordingly { if (Lander.Left >= Pad.Left && Lander.Width + Lander.Left <= Pad.Left + Pad.Width) { //Add Speed Value Check to see if too fast Won = true; } else { Won = false; } if (Won) { SuccessFaillbl.Text = "Congrats Captain " + CapsName + ", Mission Complete."; } else { SuccessFaillbl.Text = "Sorry Captain " + CapsName + ", Mission Failed."; } Movetmr.Stop(); SuccessFaillbl.Show(); }
void Checkcol() { if (Lander.Left >= Pad.Width && Lander.Width <= Pad.Left + Pad.Width) { //Add Speed Value Check to see if too fast Won = true; } else { Won = false; } if (Won) { SuccessFaillbl.Text = "Congrats Captain " + CapsName + ", Mission Complete."; } else { SuccessFaillbl.Text = "Sorry Captain " + CapsName + ", Mission Failed."; } Movetmr.Stop(); SuccessFaillbl.Show(); }