public void AddAgeAndCheckStatus(int amount) { if (_petStatus.Age <= _petStatus.MaxAge) { _petStatus.Age = +amount; } else { PetHasDied?.Invoke(); } }
public void ReduceLoveAndCheckStatus(int amount) { if (_petStatus.Love - amount > 0) { _petStatus.Love = -amount; } else { // later add timer so it doesn't die instantly PetHasDied?.Invoke(); } }
public void AddHungerAndCheckStatus(int amount) { if (_petStatus.Hunger - amount > 0) { _petStatus.Hunger = _petStatus.Hunger - amount; } else { // later add timer so it doesn't die instantly PetHasDied?.Invoke(); } }