public override void Reset() { this.floatVariable = null; this.intVariable = null; this.rounding = ConvertFloatToInt.FloatRounding.Nearest; this.everyFrame = false; }
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); } }