private void apply(YGOSharp.Card card, Texture2D def, string tail) { if (card == null) { return; } string smallstr = ""; if (card.Id != 0) { smallstr = GameStringHelper.getName(card) + GameStringHelper.getSmall(card); smallstr += "\n"; } if (tail == "") { description.Clear(); description.Add(smallstr + card.Desc); } else { description.Clear(); description.Add(smallstr + "[FFD700]" + tail + "[-]" + card.Desc); } picLoader.code = card.Id; picLoader.defaults = def; picLoader.loaded_code = -1; currentCard = card; shiftCardShower(true); Program.go(50, () => { shiftCardShower(true); }); }
public override void OnNetResume() { base.OnNetResume(); textWorldList.Clear(); textGuildList.Clear(); textFriendList.Clear(); initChatWindow(0); }
void Awake() { _chatList.uiCamera = UIManager.Instance.MainCamera; _inputAnchor.uiCamera = UIManager.Instance.MainCamera; _textListUI.Clear(); _inputUI.text = _inputUI.defaultText = Localization.instance.Get("IDS_TAP_TO_CHAT"); _inputBoxCollider = _inputUI.GetComponent <BoxCollider>(); _displayCheckTweener = _displayCheck.gameObject.GetComponent <TweenScale>(); _displayCheckTweener.enabled = false; }
public void UpdateNoticeDate() { if (m_BaseWndObject == null || m_BaseWndObject.activeSelf != true) { return; } if (PlayerRole.Instance.RoleAnnouncement.GetAllAnnouncementList() == null) { return; } m_NoticeLabel.Clear(); List <AnnouncementOnce> pNoticeList = PlayerRole.Instance.RoleAnnouncement.GetAllAnnouncementList(); for (byte i = 0; i < pNoticeList.Count; ++i) { if (FishConfig.Instance.m_ShopInfo.ShopMap[pNoticeList[i].ShopID].ShopItemStrMap.ContainsKey(pNoticeList[i].ShopOnlyID) == false) { continue; } //m_NoticeLabel.Add("[ffcc00]Enter[-]" + i.ToString()); string strName = FishConfig.Instance.m_ShopInfo.ShopMap[pNoticeList[i].ShopID].ShopItemStrMap[pNoticeList[i].ShopOnlyID].ItemName; string StrText = string.Format(StringTable.GetString("GlobalShop_Exchange_Notice"), pNoticeList[i].NickName, strName); m_NoticeLabel.Add(StrText); } }
public void realize() { me.api_healthHint.text = ((float)Program.I().ocgcore.life_0 > 0 ? Program.I().ocgcore.life_0 : 0).ToString(); opponent.api_healthHint.text = ((float)Program.I().ocgcore.life_1 > 0 ? Program.I().ocgcore.life_1 : 0).ToString(); me.api_name.text = Program.I().ocgcore.name_0_c; opponent.api_name.text = Program.I().ocgcore.name_1_c; me.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_0_c); opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c); iTween.MoveToLocal(me.api_healthBar.gameObject, new Vector3( (float)(me.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_0) / ((float)Program.I().ocgcore.lpLimit) * (float)(me.api_healthBar.width), me.api_healthBar.gameObject.transform.localPosition.y, me.api_healthBar.gameObject.transform.localPosition.z), 1f); iTween.MoveToLocal(opponent.api_healthBar.gameObject, new Vector3( (float)(opponent.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_1) / ((float)Program.I().ocgcore.lpLimit) * (float)(opponent.api_healthBar.width), opponent.api_healthBar.gameObject.transform.localPosition.y, opponent.api_healthBar.gameObject.transform.localPosition.z), 1f); instance_lab.Clear(); if (Program.I().ocgcore.confirmedCards.Count > 0) { instance_lab.Add(GameStringHelper.yijingqueren); } foreach (var item in Program.I().ocgcore.confirmedCards) { instance_lab.Add(item); } }
public override void OnBeforeShow(params object[] pArgs) { Single.Coroutine.NextUpdate(() => { m_pLabelTitle.text = (string)pArgs[0]; //m_pLabelBody.text = (string)pArgs[1]; m_pTextListBody.Clear(); m_pTextListBody.textLabel.pivot = UIWidget.Pivot.Center; m_pTextListBody.Add((string)pArgs[1]); switch ((eAlertButtonType)pArgs[2]) { case eAlertButtonType.NoButton: m_pOneButton.SetActive(false); m_pTwoButton.SetActive(false); break; case eAlertButtonType.OneButton: m_pOneButton.SetActive(true); m_pTwoButton.SetActive(false); break; case eAlertButtonType.TwoButton: m_pOneButton.SetActive(false); m_pTwoButton.SetActive(true); break; } m_pCallback = (Action <eAlertButtonAction>)pArgs[3]; }); }
IEnumerator fill() { yield return(new WaitForEndOfFrame()); TouZhuNeiRong.Clear(); TouZhuNeiRong.Add(orderValue); }
/** 初始化UI */ public void initUI(string[] strList) { textList.Clear(); if (strList != null) { for (int i = 0; i < strList.Length; i++) { textList.Add(strList[i]); } } }
static public int Clear(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); self.Clear(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
void SendTalk(int index, bool isPress) { if (mInputTalk.label.text.CompareTo(mDefaultInput) == 0 || string.IsNullOrEmpty(mInputTalk.value)) { MsgInfoManager.Instance.ShowMsg((int)ERROR_TYPE.eT_TalkSendNull); return; } RoomCtrl.Instance.SendTalkMessage(mInputTalk.value); mInputTalk.value = ""; mInputTalkList.Clear(); }
static int Clear(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1); obj.Clear(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// 更新公会基础信息 /// </summary> public void updateBaseInfo() { if (GuildManagerment.Instance.guildFightInfo.messageList == null || GuildManagerment.Instance.guildFightInfo.messageList.Count == 0) { return; } messageLabel.Clear(); msgList.Clear(); int count = GuildManagerment.Instance.guildFightInfo.messageList.Count; messageLabel.Add(GuildManagerment.Instance.guildFightInfo.messageList [0]); for (int i = count - 1; i > -1; i--) { msgList.Add(GuildManagerment.Instance.guildFightInfo.messageList [i]); } }
public void ShowItemDestribe(int itemId) { itemDes.Clear(); if (!ConfigReader.ItemXmlInfoDict.ContainsKey(itemId)) { return; } ItemConfigInfo info = ConfigReader.ItemXmlInfoDict[itemId]; itemIcon.spriteName = info.sIcon; itemName.text = info.sNameCh; itemDes.Add(info.sDescribe); ItemId = itemId; ShowMoney(itemId); }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) //按下鼠标左键 { dialogue_index++; //对话跳到一下个 if (dialogue_index < dialogue_count) { detail.Clear(); roleName.Clear(); dialogues_handle(dialogue_index);//载入下一条对话 } else { //对话完了 SceneManager.LoadScene("Level1"); } } }
private void InitData() { if (textList == null || multiTextList == null) { return; } textList.Clear(); multiTextList.Clear(); List <GuildMsg> list = guild.msgs; if (list != null) { for (int i = 0; i < list.Count; i++) { updateMsg(list [i]); } } }
private void EventInit() { UIEventListener.Get(GameUtility.FindDeepChild(gameObject, "Button_打开串口").gameObject).onClick = delegate { OpenPort(); }; UIEventListener.Get(GameUtility.FindDeepChild(gameObject, "Button_关闭串口").gameObject).onClick = delegate { ClosePort(); }; UIEventListener.Get(GameUtility.FindDeepChild(gameObject, "Button_发送").gameObject).onClick = delegate { SendBuf(); }; UIEventListener.Get(GameUtility.FindDeepChild(gameObject, "Button_清除数据").gameObject).onClick = delegate { textList.Clear(); }; }
// Update is called once per frame void Update() { // Check chat service { _inputUI.defaultText = Localization.instance.Get("IDS_TAP_TO_CHAT"); _inputBoxCollider.enabled = true; } IChatChannel chatChannel = ChatManager.Instance.GetChatChannel(IChatChannel.ENUM_CHAT_CHANNEL.CHANNEL_GUILD); if ((chatChannel != null) && chatChannel.HasNewMessage()) { _textListUI.Clear(); chatChannel.SortMessagesByStamptime(); List <ChatMessage> msgList = chatChannel.GetMessages(); for (int i = 0; i < msgList.Count; i++) { ChatMessage chatMessage = msgList[i]; string message = chatMessage.messageText; if (NetworkUtils.IsSystemMessage(message)) { string nickName = Localization.instance.Get("IDS_MESSAGE_TYPE_SYSTEM"); _textListUI.Add(nickName + ": " + message); } else { _textListUI.Add("[00FF00]" + chatMessage.fromPlayerInfo.nickName + "[-]" + ": " + message); } } chatChannel.SetNewMessageFlag(false); _uiScrollbar.scrollValue = 1f; } }
private void ClearChildren() { textList.Clear(); }
public void Clear() { uiIn.Clear(); //Clear the input list control uiIn.textLabel.text = ""; }
void OnDisable() { textList.Clear(); }