示例#1
0
        public override void OnCalled(Message msg, NetIncomingMessage netMsg = null)
        {
            MessagePlayerHookUsed message = msg as MessagePlayerHookUsed;

            var player = MultiplayerManager.instance.m_players.FirstOrDefault(x => x.ID == message.playerId);

            player.PlayerGameObject.GetComponent <PlayerRemote>().OnPlayerHookUsed(message.hookPosition);
        }
示例#2
0
        private void SendPlayerHookUsed(Vector3 hookPosition)
        {
            MultiplayerManager mInstance = MultiplayerManager.instance;

            int playerID = GetComponent <Player>().m_playerId;

            MessagePlayerHookUsed message = new MessagePlayerHookUsed();

            message.playerId     = playerID;
            message.hookPosition = hookPosition;
            mInstance.SendNetworkMessage(message, SendTo.Others);
        }
        private void SendPlayerHookUsed(Vector3 hookPosition)
        {
            MultiplayerManager mInstance = MultiplayerManager.instance;

            int playerID = GetComponent<Player>().m_playerId;

            MessagePlayerHookUsed message = new MessagePlayerHookUsed();
            message.playerId = playerID;
            message.hookPosition = hookPosition;
            mInstance.SendNetworkMessage(message, SendTo.Others);
        }