private void FinishNextPhase() { PhaseTimer.Stop(); GameState.CurrentSpeed = PhaseSpeed; GameState.ShowCorrectSquare = false; InitializeLoadingBar(); SetZulrahImage(); SetInformationLabels(Rotation.CurrentPhase.PlayerBlockIDs.Count > 1); lblTimeLeft.Location = new Point(731, 39); lblTimeLeft.Font = new Font(lblTimeLeft.Font.FontFamily, 20.25f); lblTimeLeft.Text = ""; PhaseTimer.Tick -= PhaseTimer_TickDown; PhaseTimer.Tick += PhaseTimer_TickUp; loadingBar.BackColor = Color.FromArgb(46, 252, 56); Refresh(); PhaseTimer.Start(); }
private void btnStart_Click(object sender, EventArgs e) { if (PhaseTimer.Enabled) { PhaseTimer.Stop(); } ResetGame(); StartTimer(); }
public void StepThroughBlocks() { PhaseTimer.Stop(); GameState.PhaseBlock++; GameState.CurrentSpeed = PhaseStepSpeed; SetInformationLabels(true); InitializeLoadingBar(); PhaseTimer.Start(); if (GameState.Debug_mode) { Refresh(); } }
private void NextPhase() { PhaseTimer.Stop(); GameState.PhaseBlock = 0; GameState.CurrentSpeed = PhaseSpeed; if (GameState.Correct) { GameState.CorrectCount++; } else { GameState.IncorrectCount++; } SetScoreLabel(); cbJadPhase.Checked = false; bool done = Rotation.NextPhase(); if (done) { loadingBar.BackColor = Color.FromArgb(46, 252, 56); InitializeLoadingBar(); loadingBar.Refresh(); lblRotation.Text = "Rotation Complete"; if (cbLoop.Checked) { SetRotation(); PreNextPhase(); } } else { PreNextPhase(); } }
private void btnStop_Click(object sender, EventArgs e) { PhaseTimer.Stop(); }