示例#1
0
    void Score()
    {
        uint score;

        score = ScoreCounte.CurrentScore();
        scoreText.GetComponent <Text> ().text = "= " + score.ToString();
    }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         ScoreCounte.Rest();
         SceneManager.LoadScene("TitleGame");
     }
 }
示例#3
0
    void OnTriggerEnter(Collider c)
    {
        GameObject target = c.gameObject;

        if (target.GetComponent <House> () != null)
        {
            inHouse = true;
        }

        if (target.tag == "Buyer")
        {
            if (cropYields == 0)
            {
                target.GetComponent <Buyer> ().RingNoMoney();
                return;
            }

            ScoreCounte.AddScore((uint)cropYields);
            cropYields = 0;
            target.GetComponent <Buyer> ().RingMoney();
            Destroy(target);
        }
    }
 // Use this for initialization
 void Start()
 {
     text      = GetComponent <Text>();
     text.text = ScoreCounte.CurrentScore().ToString();
 }