public void AddPoints(int value)
 {
     upReached   = false;
     downReached = false;
     gc.SetPoints(gc.GetPoints() + value);
     ChangePolarity();
 }
Esempio n. 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         gc.ChangeGravity();
         Destroy(gameObject);
         gc.SetPoints(gc.GetPoints() + 1);
     }
 }