示例#1
0
 private void Start()
 {
     initialPosition = transform.position;
     locked          = false;
     Score           = GameObject.FindGameObjectWithTag("Score");
     score           = Score.GetComponent <Player_score>();
 }
示例#2
0
    private void Start()
    {
        timer = mainTimer;
        Score = GameObject.FindGameObjectWithTag("Score");
        score = Score.GetComponent <Player_score>();

        GameObject gameover        = GameObject.Find("Gameover");
        GameOver   GameOver_script = gameover.GetComponent <GameOver>();

        GameOver_script.callingScence = SceneManager.GetActiveScene().buildIndex;
    }
示例#3
0
 private void dec_btt_Click(object sender, EventArgs e)
 {
     this.Player_score -= 10;
     if (Player_score >= 0 && Player_score < 10)
     {
         score_lb.Text = "00" + Player_score;
         return;
     }
     if (Player_score >= 10 && Player_score < 100)
     {
         score_lb.Text = "0" + Player_score;
         return;
     }
     score_lb.Text = Player_score.ToString();
 }
示例#4
0
 private void add_custom_btt_Click(object sender, EventArgs e)
 {
     try
     {
         this.Add_score = Convert.ToInt32(addScore_tb.Text);
         Player_score   = Add_score;
         if (Player_score >= 0 && Player_score < 10)
         {
             score_lb.Text = "00" + Player_score;
             return;
         }
         if (Player_score >= 10 && Player_score < 100)
         {
             score_lb.Text = "0" + Player_score;
             return;
         }
         score_lb.Text = Player_score.ToString();
     } catch (Exception ex)
     {
         MessageBox.Show("Không nhập đúng định dạng !!! : " + ex.Message);
         return;
     }
 }
示例#5
0
 // Use this for initialization
 void Start()
 {
     startPos = this.transform.position;
     Score    = GameObject.FindGameObjectWithTag("Score");
     score    = Score.GetComponent <Player_score>();
 }