コード例 #1
0
 public void IncreasePowerPoints()
 {
     if (currentPowerPoints == MAXPOWERPOINTS)
     {
         return;
     }
     currentPowerPoints++;
     RecivedPowerPoint?.Invoke(currentPowerPoints);
 }
コード例 #2
0
 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);
 }