GameObject GetWhisperItem(InJoy.FCComm.BriefPlayerInfo peerInfo) { foreach (Transform t in _whisperGrid.transform) { UIWhisperItem item = t.gameObject.GetComponent <UIWhisperItem>(); if (item.PeerInfo.playerId == peerInfo.playerId) { return(t.gameObject); } } return(null); }
public GameObject AddWhisperItem(InJoy.FCComm.BriefPlayerInfo peerInfo) { GameObject item = GetWhisperItem(peerInfo); if (item != null) { return(item); } GameObject o = _whisperGrid.InsertItem(0, _whisperItem); UIWhisperItem uiItem = o.GetComponent <UIWhisperItem>(); uiItem.PeerInfo = peerInfo; uiItem.RadioButtonRoot = _radioButtonRoot; uiItem.ChatHandler = this; //_whisperGrid.repositionNow = true; return(uiItem.gameObject); }
public void SelectPrivateChannel(InJoy.FCComm.BriefPlayerInfo toUser) { UIChatHandler._isGuildChat = false; //SetFullScreenBGTransparent(); EnableChatlist(true); _displayCheck.isChecked = true; ChatManager.Instance.CurrentPeerInfo = toUser; GameObject item = AddWhisperItem(toUser); if (item != null) { item.GetComponent <UICheckbox>().isChecked = true; _townCheck.isChecked = false; } SelectWhisperItem(item.transform); SelectPrivateChannel(); }
// There is a new private message coming. public void OnReceivePrivateMessage(InJoy.FCComm.BriefPlayerInfo playerInfo) { AddWhisperItem(playerInfo); SoundManager.Instance.PlaySoundEffect("Evolve_finish"); }