public void SendMessage() { Debug.Log(DateTime.Now.ToString("hh:mm:ss:ffff") + ": Пользователь " + currentPlayer.LANPPH.name + " отправил сообщение: '" + IFChat.text + "'"); currentPlayer.CmdSendChatMessage(currentPlayer.LANPPH.GetNickName() + ": " + IFChat.text); IFChat.text = ""; }
// Use this for initialization void Start() { ItServer = isServer; ItLocalPlayer = isLocalPlayer; ItClient = isClient; if (isLocalPlayer) { PP = FindObjectOfType<PlayerProfile>(); IdPlayer = this.GetInstanceID().ToString(); NickName = PP.GetNickName(); PathToAvatar = PP.GetAvatarPath(); LANPPL.CmdSendChatMessage("Игрок " + NickName + " подключился к лобби"); LANPPL.CmdSetIdPlayer(IdPlayer); LANPPL.CmdSetNickName(IdPlayer, NickName); LANPPL.SendImage(IdPlayer, PathToAvatar); LANPPL.CmdSetPlayerPanel(IdPlayer); LANPPL.CmdResendAllImage(); } }