Пример #1
0
        /// <summary>
        /// Handle synchronization packet from the network.
        /// </summary>
        /// <param name="msg">The message to handle.</param>
        public virtual void HandleSynchronization(Messages.VehicleSyncMessage message)
        {
            interpolator.SetTarget(Utils.NetVec3ToGame(message.position), Utils.NetQuatToGame(message.rotation));
            syncReceiveTime = netManager.GetNetworkClock();

            if (GameObject != null)
            {
                GameObject.Steering = message.steering;
            }
        }
Пример #2
0
 /// <summary>
 /// Handle synchronization packet from the network.
 /// </summary>
 /// <param name="msg">The message to handle.</param>
 public virtual void HandleSynchronization(Messages.VehicleSyncMessage msg)
 {
     interpolator.SetTarget(Utils.NetVec3ToGame(msg.position), Utils.NetQuatToGame(msg.rotation));
     syncReceiveTime = netManager.GetNetworkClock();
 }