void UpdatePage() { ProgressLabel.Text = string.Format("{0} / {1}", CurrentPage, MaxPages); if (CurrentPage == 1) { PrevButton.Disable(); PrevButton.Hide(); } else { PrevButton.Enable(); PrevButton.Show(); } if (CurrentPage == MaxPages) { NextButton.Text = "Close"; NextButton.RemoveAllEventHandlers(); NextButton.Click += new MouseEventHandler(CloseButton_Click); RobotFlash.Stop(); MissionFlash.Stop(); BrainsFlash.Stop(); RobotFlash.Reset(); MissionFlash.Reset(); BrainsFlash.Reset(); } else { NextButton.Text = "Next"; NextButton.RemoveAllEventHandlers(); NextButton.Click += new MouseEventHandler(NextButton_Click); } RobotFlash.Reset(); MissionFlash.Reset(); BrainsFlash.Reset(); RobotFlash.Stop(); MissionFlash.Stop(); BrainsFlash.Stop(); switch (CurrentPage) { case 2: RobotFlash.Play(); break; case 3: MissionFlash.Play(); break; case 4: BrainsFlash.Play(); break; } ShowText(); }
void CloseButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { RobotFlash.Stop(); MissionFlash.Stop(); BrainsFlash.Stop(); RobotFlash.Reset(); MissionFlash.Reset(); BrainsFlash.Reset(); panel.Hide(); PlayerPrefs.SetInt(TUTORIAL_SEEN, 1); }