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); }
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); }