Esempio n. 1
0
 private string UnitToMeter(string text)
 {
     try
     {
         float worldScale = HLVRSettingsManager.ModSettings.GetWorldScale();
         return(I18N.IntToString((int)(I18N.ParseFloat(text) * UNIT_TO_CM * worldScale)));
     }
     catch (Exception)
     {
         return("");
     }
 }
Esempio n. 2
0
 private string MeterToUnit(string text)
 {
     try
     {
         float worldScale    = HLVRSettingsManager.ModSettings.GetWorldScale();
         float invWorldScale = worldScale != 0 ? 1 / worldScale : 0;
         return(I18N.IntToString((int)(I18N.ParseFloat(text) * CM_TO_UNIT * invWorldScale)));
     }
     catch (Exception)
     {
         return("");
     }
 }