// ------------------ server message handlers ------------------- static internal void OnAnimationServerMessage(NetworkMessage netMsg) { netMsg.ReadMessage(s_AnimationMessage); if (LogFilter.logDev) { Debug.Log("OnAnimationMessage for netId=" + s_AnimationMessage.netId + " conn=" + netMsg.conn); } GameObject go = NetworkServer.FindLocalObject(s_AnimationMessage.netId); if (go == null) { return; } NetworkAnimator animSync = go.GetComponent <NetworkAnimator>(); if (animSync != null) { NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters); animSync.HandleAnimMsg(s_AnimationMessage, reader); NetworkServer.SendToReady(go, MsgType.Animation, s_AnimationMessage); } }
internal static void OnAnimationServerMessage(NetworkMessage netMsg) { netMsg.ReadMessage <AnimationMessage>(NetworkAnimator.s_AnimationMessage); if (LogFilter.logDev) { Debug.Log(string.Concat(new object[] { "OnAnimationMessage for netId=", NetworkAnimator.s_AnimationMessage.netId, " conn=", netMsg.conn })); } GameObject gameObject = NetworkServer.FindLocalObject(NetworkAnimator.s_AnimationMessage.netId); if (gameObject == null) { return; } NetworkAnimator component = gameObject.GetComponent <NetworkAnimator>(); if (component != null) { NetworkReader reader = new NetworkReader(NetworkAnimator.s_AnimationMessage.parameters); component.HandleAnimMsg(NetworkAnimator.s_AnimationMessage, reader); NetworkServer.SendToReady(gameObject, 40, NetworkAnimator.s_AnimationMessage); } }
internal static void OnAnimationClientMessage(NetworkMessage netMsg) { netMsg.ReadMessage <AnimationMessage>(s_AnimationMessage); GameObject obj2 = ClientScene.FindLocalObject(s_AnimationMessage.netId); if (obj2 != null) { NetworkAnimator component = obj2.GetComponent <NetworkAnimator>(); if (component != null) { NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters); component.HandleAnimMsg(s_AnimationMessage, reader); } } }
internal static void OnAnimationClientMessage(NetworkMessage netMsg) { netMsg.ReadMessage <AnimationMessage>(NetworkAnimator.s_AnimationMessage); GameObject gameObject = ClientScene.FindLocalObject(NetworkAnimator.s_AnimationMessage.netId); if (gameObject == null) { return; } NetworkAnimator component = gameObject.GetComponent <NetworkAnimator>(); if (component != null) { NetworkReader reader = new NetworkReader(NetworkAnimator.s_AnimationMessage.parameters); component.HandleAnimMsg(NetworkAnimator.s_AnimationMessage, reader); } }
internal static void OnAnimationServerMessage(NetworkMessage netMsg) { netMsg.ReadMessage(s_AnimationMessage); if (LogFilter.logDev) { Debug.Log("OnAnimationMessage for netId=" + s_AnimationMessage.netId + " conn=" + netMsg.conn); } GameObject gameObject = NetworkServer.FindLocalObject(s_AnimationMessage.netId); if (!(gameObject == null)) { NetworkAnimator component = gameObject.GetComponent <NetworkAnimator>(); if (component != null) { NetworkReader reader = new NetworkReader(s_AnimationMessage.parameters); component.HandleAnimMsg(s_AnimationMessage, reader); NetworkServer.SendToReady(gameObject, 40, s_AnimationMessage); } } }
internal static void OnAnimationServerMessage(NetworkMessage netMsg) { netMsg.ReadMessage <AnimationMessage>(NetworkAnimator.s_AnimationMessage); if (LogFilter.logDev) { Debug.Log((object)("OnAnimationMessage for netId=" + (object)NetworkAnimator.s_AnimationMessage.netId + " conn=" + (object)netMsg.conn)); } GameObject localObject = NetworkServer.FindLocalObject(NetworkAnimator.s_AnimationMessage.netId); if ((Object)localObject == (Object)null) { return; } NetworkAnimator component = localObject.GetComponent <NetworkAnimator>(); if (!((Object)component != (Object)null)) { return; } NetworkReader reader = new NetworkReader(NetworkAnimator.s_AnimationMessage.parameters); component.HandleAnimMsg(NetworkAnimator.s_AnimationMessage, reader); NetworkServer.SendToReady(localObject, (short)40, (MessageBase)NetworkAnimator.s_AnimationMessage); }