예제 #1
0
 public void Shifting(ref int tempGearParam)
 {
     if (Gear.id < GearBox.Length - 1)
     {
         if (LogitechGSDK.LogiButtonTriggered(0, 4)) //  Gear shift up triggered
         {
             tempGearParam = Gear.id;
             Gear          = GearBox[1];
         }
         if (LogitechGSDK.LogiButtonReleased(0, 4)) // Gear shift up released
         {
             Gear          = GearBox[tempGearParam + 1];
             tempGearParam = Gear.id;
             gearText.text = Gear.shift.ToString();
         }
     }
     if (Gear.id > 0)
     {
         if (LogitechGSDK.LogiButtonTriggered(0, 5)) //  Gear shift down triggered
         {
             tempGearParam = Gear.id;
             Gear          = GearBox[1];
         }
         if (LogitechGSDK.LogiButtonReleased(0, 5)) //   Gear shift down released
         {
             Gear          = GearBox[tempGearParam - 1];
             tempGearParam = Gear.id;
             gearText.text = Gear.shift.ToString();
         }
     }
 }