HandleAnimTriggerMsg() private method

private HandleAnimTriggerMsg ( int hash ) : void
hash int
return void
Esempio n. 1
0
        internal static void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            netMsg.ReadMessage <AnimationTriggerMessage>(NetworkAnimator.s_AnimationTriggerMessage);
            if (LogFilter.logDev)
            {
                Debug.Log(string.Concat(new object[]
                {
                    "OnAnimationTriggerMessage for netId=",
                    NetworkAnimator.s_AnimationTriggerMessage.netId,
                    " conn=",
                    netMsg.conn
                }));
            }
            GameObject gameObject = NetworkServer.FindLocalObject(NetworkAnimator.s_AnimationTriggerMessage.netId);

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

            if (component != null)
            {
                component.HandleAnimTriggerMsg(NetworkAnimator.s_AnimationTriggerMessage.hash);
                NetworkServer.SendToReady(gameObject, 42, NetworkAnimator.s_AnimationTriggerMessage);
            }
        }
        static internal void OnAnimationTriggerServerMessage(NetworkMessage netMsg)
        {
            AnimationTriggerMessage msg = new AnimationTriggerMessage();

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

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

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

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

                NetworkServer.SendToReady(go, (short)MsgType.AnimationTrigger, msg);
            }
        }
Esempio n. 3
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);
                }
            }
        }
Esempio n. 4
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);
            }
        }
Esempio n. 5
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);
                }
            }
        }
Esempio n. 6
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);
                }
            }
        }
        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);
        }