Exemple #1
0
 private void StopEngine(Engine engine)
 {
     if (engine)
     {
         if (engine.IsPlayer)
         {
             engine.HandlerZero();
         }
         else
         {
             engine.AbsoluteStop();
         }
     }
 }
Exemple #2
0
 public void SetPlayerEngineInComposition()
 {
     if (PlayerEngine.EngineRS.RSComposition.CarComposition.Equals(TempEngine.EngineRS.RSComposition.CarComposition))
     {
         PlayerEngine.Acceleration        = TempEngine.Acceleration;
         PlayerEngine.InstructionsHandler = TempEngine.InstructionsHandler;
         TempEngine.IsActive = false;
         //reset old engine acceleration
         TempEngine.AbsoluteStop();
         TempEngine.EngineRS.RSComposition.CarComposition.CompEngine = PlayerEngine;
     }
     else
     {
         PlayerEngine.EngineRS.RSComposition.CarComposition.CompEngine = PlayerEngine;
     }
 }