Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (grabbed || other.gameObject.layer != LayerMask.NameToLayer("Player"))
     {
         return;
     }
     grabbed = true;
     Debug.Log("Collected " + stars + " star ball!");
     GlobalManager.CollectBall(stars);
     Destroy(this.gameObject);
 }