Esempio n. 1
0
 private void nextEngine()
 {
     //Debug.Log("next button clicked");
     if (oldPartCount != vessel.parts.Count || engines.Count < 1 || !hasEngines)
     {
         updateEngineList();
     }
     if (hasEngines)
     {
         selectedEngineNumber++;
         if (selectedEngineNumber >= engines.Count)
         {
             selectedEngineNumber = 0;
         }
         engineSelectionDial.updateNumber((float)selectedEngineNumber + 1);
         //Debug.Log("selected engine: " + selectedEngineNumber + ", engines: " + engines.Count);
     }
 }
Esempio n. 2
0
 private void nextEngine()
 {
     Log.dbg("next button clicked");
     if (oldPartCount != vessel.parts.Count || engines.Count < 1 || !hasEngines)
     {
         updateEngineList();
     }
     if (hasEngines)
     {
         selectedEngineNumber++;
         if (selectedEngineNumber >= engines.Count)
         {
             selectedEngineNumber = 0;
         }
         engineSelectionDial.updateNumber((float)selectedEngineNumber + 1);
         Log.dbg("selected engine: {0}, engines: {1}", selectedEngineNumber, engines.Count);
     }
 }
Esempio n. 3
0
 public override void OnUpdate()
 {
     useTime = (flightTime / 60f) % 60f;
     flightTimeCounterMin.updateNumber(useTime); //60
     if (useTime > 59f)
     {
         transition = useTime % 1f;
     }
     else
     {
         transition = 0f;
     }
     flightTimeCounterHour.updateNumber(flightTime / 3600f, transition); //3600
     cycleCounter.updateNumber(cycles);
     if (maintenanceInfo != null)
     {
         maintenanceInfo.flightTime = flightTime;
         maintenanceInfo.cycles     = cycles;
     }
 }
Esempio n. 4
0
 public override void OnUpdate()
 {
     analogCounter.updateNumber((float)vessel.altitude);
 }