Exemplo n.º 1
0
 public void TargetVelocityChangeRequest(float targetVelocity)
 {
     if (Sync.IsServer)
     {
         TargetVelocity = targetVelocity;
     }
     SyncObject.ChangeStatorTargetVelocity(targetVelocity);
 }
Exemplo n.º 2
0
 private void SetTargetVelocity(float RPM, bool sync = true)
 {
     if (RPM != GetTargetVelocityRPM())
     {
         var velocity = MathHelper.RPMToRadiansPerMillisec * 1000 * RPM;
         if (sync)
         {
             if (Sync.IsServer)
             {
                 TargetVelocity = velocity;
             }
             SyncObject.ChangeStatorTargetVelocity(velocity);
         }
         else
         {
             TargetVelocity = velocity;
         }
     }
 }