示例#1
0
文件: Fish.cs 项目: Pinkolik/Aquarium
 public void ConsumeFood(IFood food)
 {
     if (!IsAlive)
     {
         return;
     }
     Health = Math.Min(MaxHealth, Health + food.HealthValue);
     CheckFishHealth();
     food.Consume();
 }