示例#1
0
    public void SetMaxAndCurrent(Nutrients nutrient, int max)
    {
        MediaNutrient mediaNutrient = GetNutrient(nutrient, true);

        mediaNutrient.SetMax(max);
        mediaNutrient.Saturate();
    }
示例#2
0
 public void CopyMax(NutrientState media)
 {
     for (int i = 0, l = media.nutrients.Count; i < l; i++)
     {
         MediaNutrient template = media.nutrients[i];
         MediaNutrient target   = GetNutrient(template.nutrient, true);
         target.SetMax(template.MaxValue);
     }
 }