Beispiel #1
0
 public void ChangeHappiness(int amount)
 {
     happiness += amount;
     if (amount > 0)
     {
         lastTimeHappy = DateTime.Now;
     }
     if (happiness > 15 && happiness < 85)
     {
         petController.Fine();
     }
     if (happiness < 15)
     {
         petController.Sad();
     }
     if (happiness < 0)
     {
         PetManager.instance.Die();
     }
     else if (happiness > 100)
     {
         happiness = 100;
     }
 }