Esempio n. 1
0
 private void label1_Click(object sender, EventArgs e)
 {
     if (label1.Text == "开始")
     {
         Tetris.ArraysReset();
         SetImageShow(Tetris.GetRenderBitmap());
         //重新生成图形
         Tetris.MoveTeries.SetPoint(TetrisMini.MoveTeries.InFactPoints.ToArray());
         Point[] points = Tetris.GetNewItemPoints();
         TetrisMini.MoveTeries.SetPoint(points.ToArray());
         SetImageMiniShow(TetrisMini.GetRenderBitmap());
         Tetris.PlayerScore = 0;
         label1.Text        = "暂停";
         IsGameRunning      = true;
     }
     else if (label1.Text == "暂停")
     {
         TimerPlayer.Stop();
         label1.Text = "继续";
     }
     else
     {
         label1.Text = "暂停";
         TimerPlayer.Start();
     }
 }
Esempio n. 2
0
 /**---------------------------------------------------------------------------------
  * Sets up the playertimer
  */
 public void SetupPlayerTimer()
 {
     playerTimerGameObj = GameObject.Find("playerTimer");
     playerTimerObj = playerTimerGameObj.GetComponent<TimerPlayer>();
     playerTimerObj.TimerRunning = false;
 }