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

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

            player.PlayerGameObject.GetComponent <PlayerRemote>().OnPlayerHookReleased();
        }
Beispiel #2
0
        private void SendPlayerHookReleased()
        {
            MultiplayerManager mInstance = MultiplayerManager.instance;

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

            MessagePlayerHookReleased message = new MessagePlayerHookReleased();

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

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

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