HandleAnimParamsMsg() private méthode

private HandleAnimParamsMsg ( AnimationParametersMessage msg, NetworkReader reader ) : void
msg UnityEngine.Networking.NetworkSystem.AnimationParametersMessage
reader NetworkReader
Résultat void
Exemple #1
0
        internal static void OnAnimationParametersClientMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationParametersMessage>(s_AnimationParametersMessage);
            GameObject obj2 = ClientScene.FindLocalObject(s_AnimationParametersMessage.netId);

            if (obj2 != null)
            {
                NetworkAnimator component = obj2.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
                    component.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
                }
            }
        }
        internal static void OnAnimationParametersClientMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationParametersMessage>(NetworkAnimator.s_AnimationParametersMessage);
            GameObject localObject = ClientScene.FindLocalObject(NetworkAnimator.s_AnimationParametersMessage.netId);

            if ((Object)localObject == (Object)null)
            {
                return;
            }
            NetworkAnimator component = localObject.GetComponent <NetworkAnimator>();

            if (!((Object)component != (Object)null))
            {
                return;
            }
            NetworkReader reader = new NetworkReader(NetworkAnimator.s_AnimationParametersMessage.parameters);

            component.HandleAnimParamsMsg(NetworkAnimator.s_AnimationParametersMessage, reader);
        }
Exemple #3
0
        internal static void OnAnimationParametersServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationParametersMessage>(s_AnimationParametersMessage);
            if (LogFilter.logDev)
            {
                Debug.Log(string.Concat(new object[] { "OnAnimationParametersMessage for netId=", s_AnimationParametersMessage.netId, " conn=", netMsg.conn }));
            }
            GameObject contextObj = NetworkServer.FindLocalObject(s_AnimationParametersMessage.netId);

            if (contextObj != null)
            {
                NetworkAnimator component = contextObj.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
                    component.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
                    NetworkServer.SendToReady(contextObj, 0x29, s_AnimationParametersMessage);
                }
            }
        }
Exemple #4
0
        internal static void OnAnimationParametersServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage(s_AnimationParametersMessage);
            if (LogFilter.logDev)
            {
                Debug.Log("OnAnimationParametersMessage for netId=" + s_AnimationParametersMessage.netId + " conn=" + netMsg.conn);
            }
            GameObject gameObject = NetworkServer.FindLocalObject(s_AnimationParametersMessage.netId);

            if (!(gameObject == null))
            {
                NetworkAnimator component = gameObject.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
                    component.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
                    NetworkServer.SendToReady(gameObject, 41, s_AnimationParametersMessage);
                }
            }
        }
Exemple #5
0
        static internal void OnAnimationParametersServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage(s_AnimationParametersMessage);

            if (LogFilter.logDev)
            {
                Debug.Log("OnAnimationParametersMessage for netId=" + s_AnimationParametersMessage.netId + " conn=" + netMsg.conn);
            }

            GameObject go = NetworkServer.FindLocalObject(s_AnimationParametersMessage.netId);

            if (go == null)
            {
                return;
            }
            NetworkAnimator animSync = go.GetComponent <NetworkAnimator>();

            if (animSync != null)
            {
                NetworkReader reader = new NetworkReader(s_AnimationParametersMessage.parameters);
                animSync.HandleAnimParamsMsg(s_AnimationParametersMessage, reader);
                NetworkServer.SendToReady(go, MsgType.AnimationParameters, s_AnimationParametersMessage);
            }
        }
        internal static void OnAnimationParametersServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationParametersMessage>(NetworkAnimator.s_AnimationParametersMessage);
            if (LogFilter.logDev)
            {
                Debug.Log((object)("OnAnimationParametersMessage for netId=" + (object)NetworkAnimator.s_AnimationParametersMessage.netId + " conn=" + (object)netMsg.conn));
            }
            GameObject localObject = NetworkServer.FindLocalObject(NetworkAnimator.s_AnimationParametersMessage.netId);

            if ((Object)localObject == (Object)null)
            {
                return;
            }
            NetworkAnimator component = localObject.GetComponent <NetworkAnimator>();

            if (!((Object)component != (Object)null))
            {
                return;
            }
            NetworkReader reader = new NetworkReader(NetworkAnimator.s_AnimationParametersMessage.parameters);

            component.HandleAnimParamsMsg(NetworkAnimator.s_AnimationParametersMessage, reader);
            NetworkServer.SendToReady(localObject, (short)41, (MessageBase)NetworkAnimator.s_AnimationParametersMessage);
        }