Esempio n. 1
0
 void CmdProvideRotationsToServer(Quaternion playerRot)
 {
     syncPlayerRotation = playerRot;
     foreach (NetworkConnection nc in ((PlanetsNetworkManager)PlanetsNetworkManager.singleton).getUpdateListeners(updateAll)){
         #if UNITY_5_4_OR_NEWER
         TargetUpdateRotation(nc, playerRot);
         #else
         UpdateRotTurret ur = new UpdateRotTurret();
         ur.netId = nIdentity.netId;
         ur.rot = playerRot;
         NetworkServer.SendToClient(nc.connectionId, Msgs.updateRotTurret, ur);
         #endif
     }
 }
Esempio n. 2
0
 public void TargetUpdateRot(UpdateRotTurret ur)
 {
     syncPlayerRotation = ur.rot;
 }