Beispiel #1
0
 private void UpdateRotorControl()
 {
     //negative key pressed
     if (rotorNegativeKey != "")
     {
         if (Input.GetKeyDown(rotorNegativeKey.ToLower()))
         {
             KAS_Shared.SendMsgToRotor("EventRotorNegative", true, vess: FlightGlobals.ActiveVessel);
         }
         if (Input.GetKeyUp(rotorNegativeKey.ToLower()))
         {
             KAS_Shared.SendMsgToRotor("EventRotorNegative", false, vess: FlightGlobals.ActiveVessel);
         }
     }
     //positive key pressed
     if (rotorPositiveKey != "")
     {
         if (Input.GetKeyDown(rotorPositiveKey.ToLower()))
         {
             KAS_Shared.SendMsgToRotor("EventRotorPositive", true, vess: FlightGlobals.ActiveVessel);
         }
         if (Input.GetKeyUp(rotorPositiveKey.ToLower()))
         {
             KAS_Shared.SendMsgToRotor("EventRotorPositive", false, vess: FlightGlobals.ActiveVessel);
         }
     }
 }