Ejemplo n.º 1
0
 public void Collect()
 {
     //GetComponent<CircleCollider2D>().enabled = false;
     GetComponent <Animator>().SetBool("wasCollected", true);
     Destroy(gameObject, 0.375f);
     if (this.tag == "Cherry" && !isCollected)
     {
         ++inGameController.cherriesCollected;
         cherriesCollectedScreenText.text = "x" + inGameController.cherriesCollected.ToString();
     }
     else if (!isCollected)
     {
         inGameController.LevelFinished();
     }
     isCollected = true;
 }