コード例 #1
0
 private void updateRCSModule()
 {
     if (rcsThrust < 0)
     {
         ModuleRCS mod = part.GetComponent <ModuleRCS>();
         if (mod != null)
         {
             rcsThrust = mod.thrusterPower;
         }
     }
     if (rcsThrust > 0)
     {
         rcsModule.model.renameThrustTransforms(rcsThrustTransformName);
         float scale  = currentTankDiameter / upperModule.model.modelDefinition.diameter;
         float thrust = rcsThrust * scale * scale;
         SSTUModularRCS.updateRCSModules(part, !rcsModule.model.dummyModel, thrust, true, true, true, true, true, true);
     }
 }
コード例 #2
0
 private void updateRCSModule()
 {
     modularRCSControl = part.GetComponent <SSTUModularRCS>();
     if (modularRCSControl != null)
     {
         modularRCSControl.Start();
     }
     if (rcsThrust < 0)
     {
         ModuleRCS rcs = part.GetComponent <ModuleRCS>();
         if (rcs != null)
         {
             rcsThrust = rcs.thrusterPower;
         }
     }
     if (rcsThrust >= 0)
     {
         float thrust = rcsThrust * Mathf.Pow(coreModule.model.currentDiameterScale, 2);
         SSTUModularRCS.updateRCSModules(part, !rcsModule.model.dummyModel, thrust, true, true, true, true, true, true);
     }
 }