public void IncreasePowerPoints() { if (currentPowerPoints == MAXPOWERPOINTS) { return; } currentPowerPoints++; RecivedPowerPoint?.Invoke(currentPowerPoints); }
public void PowerUp(int pointsToSpend) { if (currentPowerPoints >= pointsToSpend) { if (powerUpLevel[pointsToSpend - 1].powerUpLevel != powerUpLevel[pointsToSpend - 1].maximumLevel) { powerUpLevel[pointsToSpend - 1].powerUpLevel++; currentPowerPoints -= pointsToSpend; RecivedPowerPoint?.Invoke(currentPowerPoints); } } Debug.Log(currentPowerPoints); }