예제 #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (progressBar1.Value < progressBar1.Maximum)
     {
         if (progressBar1.Value == 30)
         {
             textBox1.Clear();
             Random x1 = new Random();
             textBox1.Text = x1.Next(5, 7).ToString();
         }
         if (progressBar1.Value == 60)
         {
             textBox2.Clear();
             Random x2 = new Random();
             textBox2.Text = x2.Next(5, 7).ToString();
         }
         if (progressBar1.Value == 90)
         {
             textBox3.Clear();
             Random x3 = new Random();
             textBox3.Text = x3.Next(5, 7).ToString();
         }
         progressBar1.Value += 30;
     }
     else
     {
         timer1.Stop();
         if (textBox1.Text == textBox2.Text && textBox1.Text == textBox3.Text)
         {
             Winner x = new Winner();
             this.Hide();
             x.Show();
         }
     }
 }
예제 #2
0
    IEnumerator LoadWinner()
    {
        videoPlane.SetActive(false);
        mainCamera.SetActive(true);
        videoCamera.SetActive(false);
        bgMaterial.mainTexture = bgTextures[4];
        // bgCylinder.transform.rotation *= Quaternion.AngleAxis(260, Vector3.up);
        bgCylinder.transform.rotation = Quaternion.Euler(0, 53, 0);
        iTween.RotateTo(bgCylinder, iTween.Hash("rotation", new Vector3(0, 143, 0), "time", 8, "easetype", iTween.EaseType.easeOutSine));
        yield return(StartCoroutine(HideCover(Color.black)));

        int winnerId = 0;

        for (int i = 1; i < scores.Length; i++)
        {
            if (scores[i] > scores[winnerId])
            {
                winnerId = i;
            }
        }
        winner.Show(winnerId);
        iTween.MoveAdd(gameObject, iTween.Hash("name", "showStarryVideos", "delay", 22.2, "onComplete", "NextScene"));
    }