//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(); } } } }
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(); } }