Пример #1
0
 public override void Reset()
 {
     this.floatVariable = null;
     this.intVariable = null;
     this.rounding = ConvertFloatToInt.FloatRounding.Nearest;
     this.everyFrame = false;
 }
Пример #2
0
 public override void Reset()
 {
     this.floatVariable = null;
     this.intVariable   = null;
     this.rounding      = ConvertFloatToInt.FloatRounding.Nearest;
     this.everyFrame    = false;
 }
Пример #3
0
 private void DoConvertFloatToInt()
 {
     ConvertFloatToInt.FloatRounding floatRounding = this.rounding;
     if (floatRounding != ConvertFloatToInt.FloatRounding.Nearest)
     {
         if (floatRounding != ConvertFloatToInt.FloatRounding.RoundDown)
         {
             if (floatRounding == ConvertFloatToInt.FloatRounding.RoundUp)
             {
                 this.intVariable.Value = Mathf.CeilToInt(this.floatVariable.Value);
             }
         }
         else
         {
             this.intVariable.Value = Mathf.FloorToInt(this.floatVariable.Value);
         }
     }
     else
     {
         this.intVariable.Value = Mathf.RoundToInt(this.floatVariable.Value);
     }
 }