Start() 공개 메소드

public Start ( ) : void
리턴 void
예제 #1
0
 //it reloads the corresponding page depending on if the user got the question correct or wrong
 private void Reload_Tick(object sender, EventArgs e)
 {
     Reload.Enabled = true;
     Reload.Start();
     if (txtAnswer.Text == "Correct!")
     {
         if (reloadcounter > 0)
         {
             reloadcounter--;
             if (reloadcounter == 3)
             {
                 txtAnswer.Text = ("Reloading...");
                 var form2 = new Game();
                 form2.Show();
                 this.Hide();
             }
         }
     }
     if (txtAnswer.Text == "Wrong!")
     {
         if (reloadcounter > 0)
         {
             reloadcounter--;
             if (reloadcounter == 3)
             {
                 var form1 = new Lose();
                 form1.Show();
                 this.Hide();
             }
         }
     }
     if (txtAnswer.Text == "Time's Out!")
     {
         if (reloadcounter > 0)
         {
             reloadcounter--;
             if (reloadcounter == 3)
             {
                 var form1 = new Lose();
                 form1.Show();
                 this.Hide();
             }
         }
     }
 }
예제 #2
0
 public override void Use()
 {
     if (mouse0KeyDown && !shoot.isActual && !jerkShutter.isActual && !reload.isActual && !showAmmo.isActual && jerkShutter.chamberAmmo)
     {
         shoot.Start();
     }
     if (mouse1KeyDown && !shoot.isActual && !jerkShutter.isActual && !reload.isActual && !showAmmo.isActual)
     {
         jerkShutter.Start();
     }
     if (rKeyUp && rKeyTimer < 0.5f && !shoot.isActual && !jerkShutter.isActual && !reload.isActual && !showAmmo.isActual)
     {
         reload.Start();
     }
     if (rKey && rKeyTimer >= 0.5f && !shoot.isActual && !jerkShutter.isActual && !reload.isActual && !showAmmo.isActual)
     {
         showAmmo.Start();
     }
 }