public void Undo()
        {
            int powerLevelDiff = powerShieldSystem.Level - prevLevel;

            int count = powerLevelDiff / 10;

            if (powerLevelDiff > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    powerShieldSystem.DecreasePowerShieldLevel();
                }
            }
            else
            {
                for (int i = 0; i < count; i++)
                {
                    powerShieldSystem.DecreasePowerShieldLevel();
                }
            }
        }
 public void Execute()
 {
     powerShieldSystem.DecreasePowerShieldLevel();
 }
Пример #3
0
 public void Undo()
 {
     powerShieldSystem.DecreasePowerShieldLevel();
 }