예제 #1
0
        void SimonSequence_Tick(object sender, EventArgs e)
        {
            fire7_wav.IsMuted   = false;
            ice03_wav.IsMuted   = false;
            bolt06_wav.IsMuted  = false;
            earth04_wav.IsMuted = false;

            if (sequence[SimonIndex] == 3)
            {
                Yellow.Begin();
            }
            if (sequence[SimonIndex] == 2)
            {
                Green.Begin();
            }
            if (sequence[SimonIndex] == 1)
            {
                Red.Begin();
            }
            if (sequence[SimonIndex] == 0)
            {
                Blue.Begin();
            }

            SimonIndex++;
            if (SimonIndex == maxIndex + 1)
            {
                SimonSequence.Stop();
                CanPlay = true;
                msg.Stop();
                MSG.Text     = "GIVE IT A GO!";
                secRemaining = TimerMax;
                timetxt.Text = secRemaining.ToString();
                Timer.Start();
                if (this.game.Difficulty == SimonSaysDifficulty.Hard)
                {
                    //if (TimerDifficulty == 3)
                    tickHard.Begin();
                }
                if (this.game.Difficulty == SimonSaysDifficulty.Normal)
                {
                    //if (TimerDifficulty == 2)
                    tickMedium.Begin();
                }
                if (this.game.Difficulty == SimonSaysDifficulty.Ease)
                {
                    //if (TimerDifficulty == 1)
                    tickEasy.Begin();
                }
            }
        }
예제 #2
0
        private void AnswerCountdown(object sender, EventArgs e)
        {
            sec++;
            if (sec == 3)
            {
                if (CurrentRegion == sequence[index])
                {
                    sec = 0;
                    //Swsto
                    if (CurrentRegion == 3)
                    {
                        Yellow.Begin();
                    }
                    if (CurrentRegion == 2)
                    {
                        Green.Begin();
                    }
                    if (CurrentRegion == 1)
                    {
                        Red.Begin();
                    }
                    if (CurrentRegion == 0)
                    {
                        Blue.Begin();
                    }

                    tickHard.Stop();
                    tickEasy.Stop();
                    tickMedium.Stop();
                    Timer.Stop();
                    Time.EndAngle = 360;
                    secRemaining  = TimerMax;
                    timetxt.Text  = secRemaining.ToString();


                    if (index == maxIndex)
                    {
                        Sequence.Text = "Sequence Typed: ";
                        score++;
                        if (score < 10)
                        {
                            ScoreText.Text = "0" + score;
                        }
                        else
                        {
                            ScoreText.Text = score.ToString();
                        }

                        ProgressSequence(true);
                    }
                    else
                    {
                        Timer.Start();
                        if (TimerDifficulty == 3)
                        {
                            tickHard.Begin();
                        }
                        if (TimerDifficulty == 2)
                        {
                            tickMedium.Begin();
                        }
                        if (TimerDifficulty == 1)
                        {
                            tickEasy.Begin();
                        }
                        index++;
                        Sequence.Text = "Sequence Typed: ";
                        for (int i = 0; i < index; i++)
                        {
                            Sequence.Text += sequence[i] + " ";
                        }
                    }
                }
                else
                {
                    FailCount++;
                    wrong.Begin();
                    //Lathos
                    failed.Text = "Times FAILED: " + FailCount;
                    ProgressSequence(false);
                }
            }
        }