public override void init() { a3_Recharge.Instance = this; this.isManLvl = base.transform.FindChild("topCon/isMaxLvl").gameObject; this.btnClose = new BaseButton(base.getTransformByPath("btn_close"), 1, 1); this.btnClose.onClick = new Action <GameObject>(this.OnCLoseClick); this.btnVipPri = new BaseButton(base.getTransformByPath("btn_VipPri"), 1, 1); this.btnVipPri.onClick = new Action <GameObject>(this.OnVipPri); this.Vip_lvl = base.getComponentByPath <Text>("topCon/Image_level/Text"); this.NeedCount = base.getComponentByPath <Text>("topCon/Text_bg_1/Text_num"); this.ToNextVip = base.getComponentByPath <Text>("topCon/Text_level"); this.toptext = base.transform.FindChild("topCon/Text_bg_1").gameObject; this.bindDiamond = base.getComponentByPath <Text>("bindDiamond/Text"); this.Diamond = base.getComponentByPath <Text>("Diamond/Text"); this.ExpImg = base.getComponentByPath <Image>("topCon/Image_exp"); this.recharge_Refresh(); }
public override void onShowed() { isshow = this; GRMap.GAME_CAMERA.SetActive(false); UIClient.instance.addEventListener(UI_EVENT.ON_MONEY_CHANGE, Refresh_Diamond); A3_VipModel.getInstance().OnExpChange += OnExpChange; A3_VipModel.getInstance().OnLevelChange += OnVipLevelChange; OnVipLevelChange(); OnExpChange(); recharge_Refresh(); Refresh_Diamond(null); toTach_close = false; if (a3_relive.instans) { transform.SetAsLastSibling(); a3_relive.instans.FX.SetActive(false); } }
public override void init() { getComponentByPath <Text>("topCon/Text_bg_1").text = ContMgr.getCont("a3_Recharge_0"); getComponentByPath <Text>("topCon/isMaxLvl").text = ContMgr.getCont("a3_Recharge_1"); getComponentByPath <Text>("buy_bg/item/name").text = ContMgr.getCont("a3_Recharge_2"); getComponentByPath <Text>("buy_bg/item/item_text").text = ContMgr.getCont("a3_Recharge_3"); Instance = this; isManLvl = this.transform.FindChild("topCon/isMaxLvl").gameObject; btnClose = new BaseButton(this.getTransformByPath("btn_close")); btnClose.onClick = OnCLoseClick; btnVipPri = new BaseButton(this.getTransformByPath("btn_VipPri")); btnVipPri.onClick = OnVipPri; left = this.transform.FindChild("buy_bg/Image_tq_left").gameObject; right = this.transform.FindChild("buy_bg/Image_suolian_right").gameObject; con = this.transform.FindChild("buy_bg/scrollview/con"); this.transform.FindChild("buy_bg/scrollview").GetComponent <ScrollRect>().onValueChanged.AddListener((any) => CheckArrow()); Vip_lvl = this.getComponentByPath <Text>("topCon/Image_level/Text"); NeedCount = this.getComponentByPath <Text>("topCon/Text_bg_1/Text_num"); ToNextVip = this.getComponentByPath <Text>("topCon/Text_level"); toptext = this.transform.FindChild("topCon/Text_bg_1").gameObject; bindDiamond = this.getComponentByPath <Text>("bindDiamond/Text"); Diamond = this.getComponentByPath <Text>("Diamond/Text"); ExpImg = this.getComponentByPath <Image>("topCon/Image_exp"); left.SetActive(false); right.SetActive(true); transform.SetAsLastSibling(); }
public override void onClosed() { isshow = null; GRMap.GAME_CAMERA.SetActive(true); UIClient.instance.removeEventListener(UI_EVENT.ON_MONEY_CHANGE, Refresh_Diamond); A3_VipModel.getInstance().OnExpChange -= OnExpChange; A3_VipModel.getInstance().OnLevelChange -= OnVipLevelChange; foreach (GameObject o in retra.Values) { Destroy(o); } retra.Clear(); //Instance = null; if (a3_relive.instans) { a3_relive.instans.FX.SetActive(true); } if (a3_lottery.mInstance?.toRecharge == true && toTach_close) { a3_lottery.mInstance.toRecharge = false; InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_LOTTERY); } if (a3_sign.instan != null && a3_sign.instan.returnthis && toTach_close) { a3_sign.instan.returnthis = false; InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SIGN); } if (a3_new_pet.instance != null && a3_new_pet.instance.toback && toTach_close) { a3_new_pet.instance.toback = false; InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_NEW_PET); } }