Exemple #1
0
 public override void Eat(BaseNpc baseNpc, float timeSpent)
 {
     if (this.eatSeconds <= 0f)
     {
         return;
     }
     this.eatSeconds -= timeSpent;
     baseNpc.AddCalories(this.caloriesPerSecond * timeSpent);
     if (this.eatSeconds < 0f)
     {
         this.DestroyItem();
         base.Kill(BaseNetworkable.DestroyMode.None);
     }
 }
Exemple #2
0
 public override void Eat(BaseNpc baseNpc, float timeSpent)
 {
     ResetRemovalTime();
     Hurt(timeSpent * 5f);
     baseNpc.AddCalories(timeSpent * 2f);
 }