示例#1
0
    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();
    }
示例#2
0
    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);
    }