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