예제 #1
0
 public void FixedUpdate()
 {
     if (State == AnimatorState.Opening ||
         State == AnimatorState.Closing ||
         just_loaded)
     {
         if (just_loaded)
         {
             StartCoroutine(FirstTimeUpdateNodes());
             just_loaded = false;
         }
         else
         {
             UpdatePart();
             part.BreakConnectedStruts();
         }
     }
     if (compressor != null && !has_compressed_gas)
     {
         CompressedGas += compressor.CompressGas();
         if (has_compressed_gas)
         {
             ToggleEvents();
         }
     }
 }
예제 #2
0
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     if (State == AnimatorState.Opening ||
         State == AnimatorState.Closing)
     {
         UpdatePart();
         part.BreakConnectedCompoundParts();
     }
     if (Compressor.Valid && !has_compressed_gas)
     {
         CompressedGas += Compressor.CompressGas();
         if (has_compressed_gas)
         {
             play_compressor = false; ToggleEvents();
         }
         else
         {
             play_compressor = Compressor.OutputFraction > 0;
         }
     }
 }