Наследование: NetworkBehaviour
 private void Init()
 {
   if (this.m_Initialized)
     return;
   this.m_Initialized = true;
   this.m_AnimSync = this.target as NetworkAnimator;
   this.m_AnimatorProperty = this.serializedObject.FindProperty("m_Animator");
 }
Пример #2
0
        internal static void OnAnimationTriggerClientMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationTriggerMessage>(s_AnimationTriggerMessage);
            GameObject obj2 = ClientScene.FindLocalObject(s_AnimationTriggerMessage.netId);

            if (obj2 != null)
            {
                NetworkAnimator component = obj2.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    component.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);
                }
            }
        }
Пример #3
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);
                }
            }
        }
Пример #4
0
        internal static void OnAnimationClientMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage(s_AnimationMessage);
            GameObject gameObject = ClientScene.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);
                }
            }
        }
Пример #5
0
        internal static void OnAnimationTriggerClientMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationTriggerMessage>(NetworkAnimator.s_AnimationTriggerMessage);
            GameObject gameObject = ClientScene.FindLocalObject(NetworkAnimator.s_AnimationTriggerMessage.netId);

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

            if (component != null)
            {
                component.HandleAnimTriggerMsg(NetworkAnimator.s_AnimationTriggerMessage.hash);
            }
        }
Пример #6
0
        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);
        }
Пример #7
0
        internal static void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationTriggerMessage>(s_AnimationTriggerMessage);
            if (LogFilter.logDev)
            {
                Debug.Log(string.Concat(new object[] { "OnAnimationTriggerMessage for netId=", s_AnimationTriggerMessage.netId, " conn=", netMsg.conn }));
            }
            GameObject contextObj = NetworkServer.FindLocalObject(s_AnimationTriggerMessage.netId);

            if (contextObj != null)
            {
                NetworkAnimator component = contextObj.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    component.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);
                    NetworkServer.SendToReady(contextObj, 0x2a, s_AnimationTriggerMessage);
                }
            }
        }
Пример #8
0
        internal static void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage(s_AnimationTriggerMessage);
            if (LogFilter.logDev)
            {
                Debug.Log("OnAnimationTriggerMessage for netId=" + s_AnimationTriggerMessage.netId + " conn=" + netMsg.conn);
            }
            GameObject gameObject = NetworkServer.FindLocalObject(s_AnimationTriggerMessage.netId);

            if (!(gameObject == null))
            {
                NetworkAnimator component = gameObject.GetComponent <NetworkAnimator>();
                if (component != null)
                {
                    component.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);
                    NetworkServer.SendToReady(gameObject, 42, s_AnimationTriggerMessage);
                }
            }
        }
Пример #9
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);
                }
            }
        }
Пример #10
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);
                }
            }
        }
Пример #11
0
        internal static void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationTriggerMessage>(NetworkAnimator.s_AnimationTriggerMessage);
            if (LogFilter.logDev)
            {
                Debug.Log((object)("OnAnimationTriggerMessage for netId=" + (object)NetworkAnimator.s_AnimationTriggerMessage.netId + " conn=" + (object)netMsg.conn));
            }
            GameObject localObject = NetworkServer.FindLocalObject(NetworkAnimator.s_AnimationTriggerMessage.netId);

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

            if (!((Object)component != (Object)null))
            {
                return;
            }
            component.HandleAnimTriggerMsg(NetworkAnimator.s_AnimationTriggerMessage.hash);
            NetworkServer.SendToReady(localObject, (short)42, (MessageBase)NetworkAnimator.s_AnimationTriggerMessage);
        }
Пример #12
0
        static internal void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage(s_AnimationTriggerMessage);

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

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

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

            if (animSync != null)
            {
                animSync.HandleAnimTriggerMsg(s_AnimationTriggerMessage.hash);

                NetworkServer.SendToReady(go, MsgType.AnimationTrigger, s_AnimationTriggerMessage);
            }
        }
Пример #13
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);
            }
        }