Beispiel #1
0
 private void updateSliderSpeed()
 {
     if (values["velocityCurrent"] < 1f)
     {
         sliderSpeed.value    = 0f;
         sliderSpeedText.text = "";
     }
     else
     {
         if (values["velocityMaxCurrent"] > 1f)
         {
             sliderSpeed.value    = values["velocityCurrent"] / values["velocityMaxCurrent"];
             sliderSpeedText.text = ship.getCurrentVelocityInMetersStr() + " | " + ship.getMaxCurrentVelocityInMetersStr();
         }
         else
         {
             sliderSpeed.value    = values["velocityCurrent"] / values["velocityMax"];
             sliderSpeedText.text = ship.getCurrentVelocityInMetersStr() + " | " + ship.getMaxVelocityInMetersStr();
         }
     }
 }