Ejemplo n.º 1
0
    void Update()
    {
        Text High_Score = GameObject.Find("Canvas/High_Score").GetComponent <Text>();

        High_Score.text = "High Score : " + BirdyFly.HighScore();
        Debug.Log("High score : " + BirdyFly.HighScore());
    }
Ejemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player" && gameObject.tag == "GreenBall")
     {
         BirdyFly birdy = other.GetComponent <BirdyFly>();
         if (birdy != null)
         {
             birdy.IncreaseScore();
         }
         transform.position = new Vector3(15f, transform.position.y, 0);
     }
 }