コード例 #1
0
ファイル: Game.cs プロジェクト: Skwangles/Moon-Lander
 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();
 }
コード例 #2
0
ファイル: Game.cs プロジェクト: Skwangles/Moon-Lander
 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();
 }