public void RECV(string str0, string str1) { ChatUSER user = new ChatUSER(str0); string text = str1; Debug.Log("username : "******" text : " + str1); ChatSystem.system.New(user, text); }
public static void SEND(ChatUSER user, string text) { string str0 = user.ToString(); string str1 = text; //各PCのADD関数を引数をそのまま入れて呼ぶ _monobitview.RPC("RECV", MonobitTargets.All, str0, str1); Debug.Log("送信" + str0 + str1); }
public void New(ChatUSER user, string text) { flag = true; updateTimeColor = (user.COLOR + Color.white) / 2; for (int y = 0; y < 5; y++) { chatDatas[y] = chatDatas[y + 1]; } chatDatas[5] = new ChatData() { color = user.COLOR, username = user.NAME, text = text }; for (int y = 0; y < 6; y++) { uiData[y].name_.text = chatDatas[y].username + ":"; uiData[y].text_.text = chatDatas[y].text; uiData[y].name_.color = uiData[y].text_.color = chatDatas[y].color; } }
private void OnDestroy() { userDatas = null; system = null; }