private void timer2_Tick(object sender, EventArgs e) { label1.Text = "" + (n--); if (n == 0) { play.Stop(); this.Hide(); lose f1 = new lose(s); f1.Show(); } }
private void timer1_Tick(object sender, EventArgs e) { if (i % 2 == 0) { p6.Visible = false; } else { p6.Visible = true; } i++; label1.Text = "" + (n--); if (n == 0) { play.Stop(); this.Hide(); lose f1 = new lose(s); f1.Show(); } }
internal void goTo(lose state) { currState = state; }
internal lose update() { return(currState = getNextState[((int)currState)]()); }
internal LoseStateMachine() { currState = lose.sleep; //fill array with functions getNextState = new machine[] { Sleep, Restart, Quit }; }