private void FindObject() { g = this.GetChild("n2").asCom; g.visible = false; num = g.GetChild("n0").asTextField; btn_n = g.GetChild("n5").asButton; btn_p = g.GetChild("n4").asButton; list = this.GetChild("n1").asList; list.emptyStr = Tools.GetMessageById("19930"); list.onChangeNum.Add(this.CheckListNum); list.itemRenderer = OnRendere; btn_n.onClick.Add(() => { Next(); }); btn_p.onClick.Add(() => { Previous(); }); }
void ChangeDian(GTextField dian, int point, int tod) { switch (tod) { case 1: //天王 dian.text = "天王(" + point + ")"; break; case 2: //对子 dian.text = "对子(" + point + ")"; break; case 3: //天王对子 dian.text = "天王对子(" + point + ")"; break; default: dian.text = point.ToString() + "点"; break; } }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; c1 = null; draw_pile_txt = null; discard_pile_txt = null; run_cost_txt = null; end_run_btn = null; player_hp_txt = null; player_attack_txt = null; handcardComp = null; }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; nameTxt = null; hpTxt = null; mpTxt = null; moneyTxt = null; bagBtn = null; shopBtn = null; levelBtn = null; chatBtn = null; }
private void OnEnable() { Bag = GBag.GetComponent <UIPanel>().ui; goodsItemList = Bag.GetChild("GoodsItemList").asList; GoodsInfo = Bag.GetChild("Information").asTextField; prop = Bag.GetChild("prop").asLoader; mainEnergy = Bag.GetChild("mainEnergy").asLoader; chooseEquation = Bag.GetChild("chooseEquation").asCom; ActProgress = Bag.GetChild("ActProgress").asProgress; ActProgress.value = 0; equationItemList = Bag.GetChild("equationItemList").asList; button1 = Bag.GetChild("button1").asButton; button2 = Bag.GetChild("button2").asButton; button3 = Bag.GetChild("button3").asButton; energyprogress1 = Bag.GetChild("energyprogress1").asProgress; energyprogress2 = Bag.GetChild("energyprogress2").asProgress; energyprogress3 = Bag.GetChild("energyprogress3").asProgress; BagInitiate(); }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; n0 = null; Tittle = null; Conten = null; tow_cancel = null; tow_confirm = null; towmode = null; one_confirm = null; onemode = null; }
private void showCard(int index, int ra, string num) { GComponent goss = null; //new GComponent(); switch (index) { case 0: goss = g_bd0; g_bd0.visible = true; break; case 1: goss = g_bd1; g_bd1.visible = true; break; case 2: goss = g_bd2; g_bd2.visible = true; break; } goss.GetChild("n0").asLoader.url = Tools.GetResourceUrl("Image:icon_kp" + (ra + 1)); GTextField l = goss.GetChild("n2").asTextField; l.text = "x" + num; switch (ra) { case 1: l.color = Color.green; break; case 2: l.color = new Color(170f / 255f, 0, 1, 1); break; case 3: l.color = new Color(1, 140f / 255f, 0, 1); break; } }
public void Init() { if (bar != null) { return; } bar = UIPackage.CreateObject("baijiale", "pai").asCom; HideMouse(bar); zp1 = bar.GetChild("ZP1").asCom; zp2 = bar.GetChild("ZP2").asCom; zp3 = bar.GetChild("ZP3").asCom; xp1 = bar.GetChild("XP1").asCom; xp2 = bar.GetChild("XP2").asCom; xp3 = bar.GetChild("XP3").asCom; ZDian = bar.GetChild("ZDian").asTextField; XDian = bar.GetChild("XDian").asTextField; zp1.RemoveChildren(); zp2.RemoveChildren(); zp3.RemoveChildren(); xp1.RemoveChildren(); xp2.RemoveChildren(); xp3.RemoveChildren(); GComponent[] paiCom = new GComponent[] { zp1, zp2, zp3, xp1, xp2, xp3 }; for (int i = 0; i < 6; i++) { PokePai tmp = new PokePai("", paiCom[i]); tmp.SetPerspective(); tmp.opened = false; pais [i] = tmp; pais [i].Visible = false; } }
public override void ForceRefresh(object userData) { UserDialogParams = userData as DialogParams; if (UserDialogParams == null) { return; } Title = UserDialogParams.Title == null ? Title : UserDialogParams.Title; Mode = UserDialogParams.Mode == 0 ? 2 : UserDialogParams.Mode; Mode = Mathf.Min(Mathf.Max(1, Mode), 2); Title = string.IsNullOrEmpty(Title) ? "" : Title; modeCtl.SetSelectedIndex(Mode - 1); TitleLabel = SubCom.GetChild("title").asTextField; TitleLabel.text = Title; AddButtonClick(); var label = GComponent.GetChild("label"); if (label != null) { label.text = UserDialogParams.Message; } UserData = UserDialogParams.UserData; if (UserData != null && UserData is object[]) { var objs = UserData as object[]; if (objs.Length >= 4) { Vector3 pos = (Vector3)objs[1] + new Vector3(150, 0); //当前的l位置 Vector2 size = (Vector2)objs[2]; //限定范围宽度 Vector2 gPos = (Vector2)objs[3]; //当前所在范围内的 g位置 mOldPos = GComponent.GlobalToLocal(gPos) + new Vector2(150, 0); //当前所在的本地的老位置 ShowPos(pos, size); } } }
private void ListRendere(int index, GObject item) { GButton head = item.asCom.GetChild("n3").asButton; GTextField num = item.asCom.GetChild("n2").asTextField; GImage bg = item.asCom.GetChild("n4").asImage; GTextField name = item.asCom.GetChild("n15").asTextField; Dictionary <string, object> d = (Dictionary <string, object>)roleLove[index]; bg.visible = false; if (Tools.IsNullEmpty(d["uname"])) { name.text = d["uid"].ToString(); } else { name.text = d["uname"].ToString(); } if (d["uid"].ToString().Equals(userModel.uid)) { bg.visible = true; } Tools.SetLoaderButtonUrl(head, ModelUser.GetHeadUrl((string)d["head_use"])); num.text = d["like_num"] + ""; head.RemoveEventListeners(); head.onClick.Add(() => { Dictionary <object, object> dc_ = new Dictionary <object, object>(); dc_["fuid"] = d["uid"]; string uid = ModelManager.inst.userModel.uid; string fuid = dc_["fuid"] + ""; if (!fuid.Equals(uid)) { this.DispatchGlobalEvent(new MainEvent(MainEvent.SHOW_USER, new object[] { otherInfo["uid"].ToString(), dc_["fuid"].ToString(), roleModel.tab_Role_CurSelect1, roleModel.tab_Role_CurSelect2, roleModel.tab_Role_CurSelect3 })); } else { ViewManager.inst.ShowText(Tools.GetMessageById("13106")); } }); }
void OnTextNumberTween() { if (_textField == null) { return; } if (_currUpdateTime == _frequency) { TimeManager.Remove(OnTextNumberTween); _textField.text = _endNum.ToString(); _textField = null; _currUpdateTime = 0; return; } float currNum = (float)(_endNum - _startNum) / _frequency * _currUpdateTime + _startNum; int showNum = (int)currNum; _textField.text = showNum.ToString(); ++_currUpdateTime; }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { m_Gro_ShowVersionInfo = com.GetControllerAt(0); m_n0 = (GImage)com.GetChildAt(0); m_n9 = (GImage)com.GetChildAt(1); m_n10 = (GTextField)com.GetChildAt(2); m_Btn_Login = FUI_Btn_Login.Create(domain, com.GetChildAt(3)); m_Btn_Registe = FUI_Btn_Registe.Create(domain, com.GetChildAt(4)); m_accountInput = (GImage)com.GetChildAt(5); m_passwordInput = (GImage)com.GetChildAt(6); m_accountText = (GTextInput)com.GetChildAt(7); m_Tex_LoginInfo = (GTextField)com.GetChildAt(8); m_ToTestSceneBtn = FUI_Btn_ToTestScene.Create(domain, com.GetChildAt(9)); m_passwordText = (GTextInput)com.GetChildAt(10); m_Gro_LoginInfo = (GGroup)com.GetChildAt(11); m_t0 = com.GetTransitionAt(0); m_t1 = com.GetTransitionAt(1); } }
protected override void OnInit(object userData) { base.OnInit(userData); m_VersionText = UI.GetChild("tf_Version").asTextField; m_NoticeButton = UI.GetChild("btn_Notice").asButton; m_AccountButton = UI.GetChild("btn_Account").asButton; m_NoticePanel = UI.GetChild("notice").asCom; m_LoginPanel = UI.GetChild("login").asCom; m_RegisterPanel = UI.GetChild("register").asCom; m_LoginAccountInput = m_LoginPanel.GetChild("ipt_account").asTextInput; m_LoginPasswordInput = m_LoginPanel.GetChild("ipt_password").asTextInput; m_RegisterAccountInput = m_RegisterPanel.GetChild("ipt_account").asTextInput; m_RegisterPasswordInput = m_RegisterPanel.GetChild("ipt_password").asTextInput; m_AccountRegisterButton = m_RegisterPanel.GetChild("btn_register").asButton; m_RegisterButton = m_LoginPanel.GetChild("btn_rigister").asButton; m_LoginButton = m_LoginPanel.GetChild("btn_login").asButton; m_NoticePanel.visible = false; m_LoginPanel.visible = false; m_RegisterPanel.visible = false; }
protected override void StartFUI() { this.m_title = this.FUIComponent.Get("n4").GObject.asTextField; this.m_lanaguageText = this.FUIComponent.Get("n12").GObject.asTextField; this.m_soundText = this.FUIComponent.Get("n8").GObject.asTextField; this.m_headNameText = this.FUIComponent.Get("n18").GObject.asTextField; this.m_headHpText = this.FUIComponent.Get("n19").GObject.asTextField; this.m_rotSpeedText = this.FUIComponent.Get("n20").GObject.asTextField; this.m_name = this.FUIComponent.Get("n5").GObject.asTextField; this.m_dbID = this.FUIComponent.Get("n6").GObject.asTextField; this.m_language = this.FUIComponent.Get("n13").GObject.asComboBox; this.m_sound = this.FUIComponent.Get("n9").GObject.asButton; this.m_volume = this.FUIComponent.Get("n10").GObject.asSlider; this.m_showName = this.FUIComponent.Get("n22").GObject.asButton; this.m_showHP = this.FUIComponent.Get("n23").GObject.asButton; this.m_rotSpeed = this.FUIComponent.Get("n21").GObject.asSlider; this.m_determine = this.FUIComponent.Get("n17").GObject.asButton; m_lastVolume = Data.Volume; m_determine.onClick.Set(DetermineBtn_OnClick); this.m_sound.onChanged.Set(this.SoundBtn_OnChange); this.m_volume.onGripTouchEnd.Set(this.VolumeSlider_GripTouchEnd); this.m_language.items = this.m_lanageList.ToArray(); this.m_volume.max = 100; this.m_rotSpeed.max = 100; this.UI(); }
public override void Init() { base.Init(); this.Create(Config.VIEW_COMSHIPINFO); sim = (Dictionary <string, object>)(DataManager.inst.systemSimple ["card_attr_info"]); cardModel = ModelManager.inst.cardModel; tips = (object[])cardModel.shipinfo_cardData [cardModel.shipinfo_callinID]; card = cardModel.shipinfo_cvo; card.cardData = cardModel.shipinfo_cardData; cardModel.SetData(); title = this.GetChild("n4").asTextField; list = this.GetChild("n1").asList; title.text = Tools.GetMessageById(cardModel.shipinfo_title); list.itemRenderer = onListRander; list.numItems = tips.Length; list.foldInvisibleItems = true; list.ResizeToFit(tips.Length); group.height = list.height + 80; this.height = list.height + 80; }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { n0 = (GImage)com.GetChildAt(0); n9 = (GImage)com.GetChildAt(1); n10 = (GTextField)com.GetChildAt(2); Btn_Login = Btn_Login.Create(com.GetChildAt(3)); Btn_Registe = Btn_Registe.Create(com.GetChildAt(4)); accountInput = (GImage)com.GetChildAt(5); passwordInput = (GImage)com.GetChildAt(6); accountText = (GTextInput)com.GetChildAt(7); Tex_LoginInfo = (GTextField)com.GetChildAt(8); ToTestSceneBtn = Btn_ToTestScene.Create(com.GetChildAt(9)); passwordText = (GTextInput)com.GetChildAt(10); n16 = (GGroup)com.GetChildAt(11); t0 = com.GetTransitionAt(0); t1 = com.GetTransitionAt(1); } }
private void OnGetMsgHandler(VoHttp vo) { msgData = new Dictionary <string, object> (); Dictionary <string, object> data = (Dictionary <string, object>)vo.data; object[] da = data ["data"] as object[]; int currNum = 0; for (int i = 0; i < da.GetLength(0); i++) { // if ((((Dictionary<string,object>)da [i]) ["mtype"] + "") == "redbag") // { msgData [currNum + ""] = da [i]; currNum++; // } } GObject bg = this.GetChild("n14").asImage; listData = Tools.ConvertDicToList(msgData, "aaa"); list = this.GetChild("n7").asList; list.itemRenderer = List_Render; list.SetVirtual(); list.numItems = currNum; noGive = this.GetChild("n11").asTextField; if (currNum == 0) { noGive.visible = true; bg.visible = false; } else { list.visible = true; bg.visible = true; } SetListCSS(list, listData.ToArray(), 5, true); }
protected override void OnInit() { txtUnitInf = contentPane.GetChild("txtUnitInf").asTextField; txtUnitName = contentPane.GetChild("txtUnitName").asTextField; GComponent gComponent = contentPane.GetChild("UnitIcon").asCom; unit_Icon = gComponent.GetChild("ProdingIcon").asLoader; listProducting = contentPane.GetChild("listProducting").asList; gropCost = contentPane.GetChild("GropCost").asCom; txtUnitDescribe = gropCost.GetChild("txtUnitDescribe").asTextField; txtMineCost = gropCost.GetChild("txtMineNum").asTextField; txtGoldCost = gropCost.GetChild("txtGoldNum").asTextField; txtMineCount = contentPane.GetChild("txtMineCount").asTextField; txtGoldCount = contentPane.GetChild("txtGoldCount").asTextField; miniMap = contentPane.GetChild("miniMap").asCom; frame = contentPane.GetChild("frame").asCom; txtMineCount.text = GameDataManager.Instance.playerCampData.Mine_Count.ToString(); txtGoldCount.text = GameDataManager.Instance.playerCampData.Gold_Count.ToString(); gropCost.visible = false; if (!EventManager.Instance.Check(UIEventEnum.ShowUnitIntroducedUI, ShowUnitIntroducedUI)) { EventManager.Instance.Subscribe(UIEventEnum.ShowUnitIntroducedUI, ShowUnitIntroducedUI); } if (!EventManager.Instance.Check(UIEventEnum.CloseUnitIntroducedUI, CloseUnitIntroducedUI)) { EventManager.Instance.Subscribe(UIEventEnum.CloseUnitIntroducedUI, CloseUnitIntroducedUI); } GameDataManager.Instance.mineNumChange += ChangeMineCountView; miniMap.onClick.Add(SetCameraPos); }
public override void Clear() { // ViewManager.inst.s.visible = true; ViewManager.inst.s.displayObject.gameObject.SetActive(true); if (this.item != null) { this.RemoveChild(this.item, true); this.item = null; } TimerManager.inst.Remove(TimerFunction); if (mpro != null) { DOTween.Kill(mpro); } mpro = null; mprotxt = null; base.Clear(); this.DispatchGlobalEvent(new MainEvent(MainEvent.RED_GIFT)); if (ModelManager.inst.userModel.gold - gold != totalNum) { ViewManager.inst.ShowText(Tools.GetMessageById("33212")); } }
public override void Init() { base.Init(); Create(Config.COM_ALERTLIKE); alertModel = ModelManager.inst.alertModel; title = GetChild("n2").asTextField; expendNum = GetChild("n4").asTextField; text_Check = GetChild("n8").asTextField; icon = GetChild("n3").asLoader; btn_Check = GetChild("n7").asButton; btn_Cancel = GetChild("n5").asButton; btn_Cancel.text = Tools.GetMessageById("14025"); btn_Ok = GetChild("n6").asButton; btn_Ok.text = Tools.GetMessageById("14056"); title.text = Tools.GetMessageById("13056"); text_Check.text = Tools.GetMessageById("13123"); icon.url = Tools.GetResourceUrl("Image2:n_icon_zs"); expendNum.text = alertModel.count.ToString(); btn_Ok.onClick.Add(BtnOk); btn_Check.onChanged.Add(BtnCheck); btn_Cancel.onClick.Add(BtnCancel); }
private void OnLoginClick(EventContext ec) { GTextField useName = GetChild("use_name").asTextField; GTextField passWord = GetChild("passward").asTextField; string useNameValue = useName.text; string passWordValue = passWord.text; if (string.IsNullOrEmpty(useNameValue) || string.IsNullOrEmpty(passWordValue)) { Debug.Log("帐号密码为空."); MessageUIPanel messagePanel = GUIManager.ShowOrLoadView <MessageUIPanel>("Command", "MessageUIPanel"); messagePanel.ShowMessage("帐号密码为空"); return; } Debug.Log(string.Format("entry game useName:{0} passWord:{1}", useNameValue, passWordValue)); UnityEngine.PlayerPrefs.SetString("chess_passw", passWordValue); UnityEngine.PlayerPrefs.SetString("chess_usen", useNameValue); KBEngine.Event.fireIn("login", useNameValue, passWordValue, System.Text.Encoding.UTF8.GetBytes("ChessSoldier")); }
public override void OnBeforeEnter() { Tooltips = this.contentPane.GetChild("Tooltips").asTextField; UserName = this.contentPane.GetChild("UserName").asTextInput; UserPassWord = this.contentPane.GetChild("UserPassWord").asTextInput; LoginButton = this.contentPane.GetChild("LoginButton").asButton; Tooltips.text = ""; LoginButton.onClick.Add(OnLoginButtonDown); if (!PlayerPrefs.HasKey("Sound")) { PlayerPrefs.SetInt("Sound", 1); SoundManager.Instance.Mute = false; } else { int mute = PlayerPrefs.GetInt("Sound"); SoundManager.Instance.Mute = mute == 1?false:true; } if (!PlayerPrefs.HasKey("Death")) { PlayerPrefs.SetInt("Death", 0); } }
private void List_Render1(int _index, GObject go) { int index = _index - 1; if (_index == 0 || _index == list1.numItems - 1) { go.width = 10; //(MediatorShop.thiswidth - 960) / 2; go.alpha = 0; return; } else { go.width = 190; go.alpha = 1; } GButton btn = go.asButton; //.GetChild ("n0").asButton; btn.RemoveEventListeners(); btn.onClick.Add(() => { this.onListItemClick(index); }); GTextField name = go.asCom.GetChild("n8").asTextField; // ComBigIcon card = go.asCom.GetChild("n10") as ComBigIcon; GLoader card = go.asCom.GetChild("n15").asLoader; // card.SetData (Config.ASSET_GOLD, ((object[])(gold_buy [index])) [1], 0, "Image2:" + ((object[])(gold_buy [index])) [2].ToString ()); // card.SetSelectIndex (2); // card.GetChild ("n2").visible = false; // card.GetChild ("n15").visible = false; card.url = Tools.GetResourceUrl("Image2:" + ((object[])(gold_buy [index])) [2].ToString()); go.asCom.GetChild("n14").asTextField.text = "x" + ((object[])(gold_buy [index])) [1]; //card.GetChild ("n15").asTextField.text; GTextField set_num = go.asCom.GetChild("n6").asTextField; name.text = Tools.GetMessageById(((object[])(gold_buy [index])) [3].ToString()); set_num.text = ((object[])(gold_buy [index]))[0].ToString(); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ViewState = this.GetControllerAt(0); m_Combat = this.GetControllerAt(1); m_Sex = this.GetControllerAt(2); m_WuXue = this.GetControllerAt(3); m_NeiGong = this.GetControllerAt(4); m_WaiGong = this.GetControllerAt(5); m_LabelPlaceName = (GTextField)this.GetChildAt(6); m_LabelPlaceLevel = (GTextField)this.GetChildAt(7); m_LabelCombat = (GTextField)this.GetChildAt(9); m_LabelSex = (GTextField)this.GetChildAt(11); m_LabelWuXue = (GTextField)this.GetChildAt(12); m_LabelNeiGong = (GTextField)this.GetChildAt(13); m_LabelWaiGong = (GTextField)this.GetChildAt(16); m_LabelExploreProgress = (GTextField)this.GetChildAt(17); m_LabelSuccessRate = (GTextField)this.GetChildAt(21); m_BtnSelectRight = (UI_EmptyPupilWoman)this.GetChildAt(25); m_BtnSelectLeft = (UI_EmptyPupilMan)this.GetChildAt(26); m_BtnReceiveReward = (GButton)this.GetChildAt(27); m_LabelTime = (GTextField)this.GetChildAt(29); m_LabelCost = (GTextField)this.GetChildAt(31); m_BtnExplore = (GButton)this.GetChildAt(33); m_IconReward1 = (GLabel)this.GetChildAt(35); m_IconReward2 = (GLabel)this.GetChildAt(36); m_IconReward3 = (GLabel)this.GetChildAt(37); m_PlaceList = (GList)this.GetChildAt(40); m_BtnBack = (GButton)this.GetChildAt(43); m_LabelLeftName = (GLabel)this.GetChildAt(44); m_BtnLeftCancel = (GButton)this.GetChildAt(45); m_LeftNameAndCancel = (GGroup)this.GetChildAt(46); m_LabelRightName = (GLabel)this.GetChildAt(47); m_BtnRightCancel = (GButton)this.GetChildAt(48); m_RightNameAndCancel = (GGroup)this.GetChildAt(49); }
public ControlPropertys() { string urlPopup = "ui://BlueSkin/Property_popup"; _contentPane = UIPackage.CreateObjectFromURL(urlPopup).asCom; _title = _contentPane.GetChild("title").asTextField; _listItem = _contentPane.GetChild("list").asList; _item_name = _contentPane.GetChild("item_name").asTextField; _item_des = _contentPane.GetChild("item_des").asTextField; _listAtion = _contentPane.GetChild("list_action").asList; _btClose = _contentPane.GetChild("bt_close").asButton; _model = _contentPane.GetChild("model").asGraph; var r = RenderImage; _item_image = _contentPane.GetChild("item_image").asLoader; //----// _listItem.RemoveChildrenToPool(); _listItem.onClickItem.Add(__clickItem); _listAtion.RemoveChildrenToPool(); if (_listItem.scrollPane != null) { _listItem.scrollPane.mouseWheelEnabled = false; } }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_ViewState = this.GetControllerAt(0); m_JueXueState = this.GetControllerAt(1); m_Sex = this.GetControllerAt(2); m_LabelName = (GTextField)this.GetChildAt(3); m_LabelLevel = (GTextField)this.GetChildAt(4); m_LabelCombat = (GTextField)this.GetChildAt(5); m_IconBody = (GLoader)this.GetChildAt(8); m_ProgressExp = (GProgressBar)this.GetChildAt(9); m_StarLevel = (GComponent)this.GetChildAt(10); m_TabPupilInfo = (UI_TabPupilInfo)this.GetChildAt(15); m_IconWuXue = (GButton)this.GetChildAt(22); m_BtnChangeJueXue = (GButton)this.GetChildAt(23); m_LabelWuXueName = (GTextField)this.GetChildAt(24); m_LabelWuXueType = (GTextField)this.GetChildAt(25); m_LabelWuXueCombat = (GTextField)this.GetChildAt(26); m_LabelWuXueDesc = (GTextField)this.GetChildAt(28); m_BtnEquipJueXue = (GButton)this.GetChildAt(31); m_TabJueXue = (GGroup)this.GetChildAt(32); m_BtnBack = (GButton)this.GetChildAt(34); }
void Awake() { mRoot = GetComponent <UIPanel>().ui; if (mRoot.GetChild("debuf") != null) { m_DebuffPro = mRoot.GetChild("debuf").asProgress; m_DebuffPro.visible = false; } if (mRoot.GetChild("hp") != null) { m_HP = mRoot.GetChild("hp").asProgress; } if (mRoot.GetChild("mp") != null) { m_MP = mRoot.GetChild("mp").asProgress; } if (mRoot.GetChild("name") != null) { m_Name = mRoot.GetChild("name").asTextField; } if (mRoot.GetChild("guildname") != null) { m_GuildName = mRoot.GetChild("guildname").asTextField; } if (mRoot.GetChild("level") != null) { m_Level = mRoot.GetChild("level").asTextField; } if (mRoot.GetChild("buff") != null) { m_BuffList = mRoot.GetChild("buff").asList; } }
// Use this for initialization void Start() { mainUI = GetComponent <UIPanel>().ui; // text Text = mainUI.GetChild("n2").asTextField; Text.text = "x 15"; // progressbar 1 Abar = mainUI.GetChild("n4").asProgress; // prograssbar 2 Bbar = mainUI.GetChild("n5").asProgress; // prograssbar 3 Cbar = mainUI.GetChild("n6").asProgress; Abar.max = 10; Bbar.max = 10; Cbar.max = 10; Abar.value = 0; Bbar.value = 0; Cbar.value = 0; mainUI.GetChild("n7").visible = false; mainUI.GetChild("n8").visible = false; tsText = mainUI.GetChild("n9").asTextField; tsText.visible = false; }
private void onListRander(int index, GObject obj) { GLoader n0 = obj.asCom.GetChild("n0").asLoader; GTextField n1 = obj.asCom.GetChild("n1").asTextField; GTextField n2 = obj.asCom.GetChild("n2").asTextField; GButton n3 = obj.asCom.GetChild("n3").asButton; GTextField n4 = obj.asCom.GetChild("n4").asTextField; Dictionary <string, object> tipi = (Dictionary <string, object>)tips [index]; n3.RemoveEventListeners(); n1.text = Tools.GetMessageById(((Dictionary <string, object>)sim [tipi ["type"].ToString()]) ["name"].ToString()) + ":"; string[] arr = TextFild(index, card, n3, group); n2.text = arr [0]; if (arr.Length != 1) { n4.text = arr [1]; } else { n4.text = ""; } n0.url = Tools.GetResourceUrl("Icon:" + ((Dictionary <string, object>)sim [tipi ["type"].ToString()]) ["icon"].ToString()); }
private void setItemData(string id) { Dictionary <string, object> cfg = DataManager.inst.systemSimple; GLoader ra = this.GetChild("n8").asLoader; GLoader icon = this.GetChild("n9").asLoader; ComProgressBar pro = this.GetChild("n10") as ComProgressBar; proBar = pro.GetBar(); ra.url = Tools.GetResourceUrl("Image:bg_kapai" + card.rarity); icon.url = Tools.GetResourceUrl("Icon:" + id); GTextField proText = pro.GetChild("n1").asTextField; Dictionary <string, object> exp_cfg = (Dictionary <string, object>)(cfg ["card_lv_exp"]); exp_cfg = (Dictionary <string, object>)exp_cfg [card.rarity + ""]; pro.max = card.maxExp; pro.value = card.exp; if (card.lv >= card.maxLv) { proText.color = new Color(1, 1, 0); } else { if (card.exp < card.maxExp) { pro.skin = ComProgressBar.BAR3; } else { pro.skin = ComProgressBar.BAR4; } } }