public void EnergyUp(int amount) { if (_energy < _maxEnergy) { _energy = _energy + amount > _maxEnergy ? _maxEnergy : _energy + amount; DisplayNotification?.Invoke ($"{DateTime.Now.ToLongTimeString()} - Spaceship has been repaired for {amount}! Remaining energy: {Energy}"); } }
private void DestroyAsteroid() => DisplayNotification?.Invoke($"{DateTime.Now.ToLongTimeString()} - Asteroid has been destroyed!");
public void Die() { DisplayNotification?.Invoke($"{DateTime.Now.ToLongTimeString()} - Spaceship has been destroyed!"); MessageDie?.Invoke(); }
public void EnergyLow(int amount) { _energy -= amount; DisplayNotification?.Invoke ($"{DateTime.Now.ToLongTimeString()} - Spaceship got {amount} damage! Remaining energy: {Energy}"); }