Exemplo n.º 1
0
 protected void OnDestroy()
 {
     if (currentCharStats[1] <= 0)
     {
         LevelGenerator reference = GameObject.FindGameObjectWithTag("LevelHandler").GetComponent <LevelGenerator>();
         if (reference != null)
         {
             reference.AddPoints(points);
         }
     }
 }
Exemplo n.º 2
0
    public void GetCoin()
    {
        reference.AddPoints(3);

        Destroy(gameObject);
    }