/// <summary> /// ²É¼¯°´Å¥°´Ï /// </summary> public void OnOneBtn(ButtonScript obj, object args, int param1, int param2) { GatherData gd = GatherData.GetGather(_GatherId); COM_Gather gatherD = GatherSystem.instance.GetOpenGather(_GatherId); int maxNum = 0; GlobalValue.Get(Constant.C_GatherNumMax, out maxNum); if (gatherD != null) { if (gatherD.num_ >= maxNum) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_GatherTimesLess")); return; } } //if(BagSystem.instance.BagIsFull()) //{ // PopText.Instance.Show(LanguageManager.instance.GetValue("bagfull")); // return; //} if (_GatherId == 0) { PopText.Instance.Show(LanguageManager.instance.GetValue("qingxuanzhecaiji")); return; } //GatherData gd = GatherData.GetGather(_GatherId); GatherSystem.instance.Gather(_GatherId, 1); }
void OnFinishDownFileEvent(int num) { if (isChcekFile) { return; } LuaMaster.Instance.Init(); ConfigLoader.Instance.Init(); float speed = 0f; GlobalValue.Get(Constant.C_BattleSpeed, out speed); Battle.Instance.reportPlaySpeed_ = speed; NetConnection.Instance.OnSocketError += SocketHandler; ResetGameConfig(); switchSceneMask_ = new GameObject("SceneMask"); UIPanel maskPanel = switchSceneMask_.AddComponent <UIPanel>(); switchSceneMask_.layer = LayerMask.NameToLayer("UI"); maskPanel.depth = 4000; maskPanel.sortingOrder = 4000; BoxCollider bc = switchSceneMask_.AddComponent <BoxCollider>(); bc.size = new Vector3(UIWidth, UIHeight, 0f); switchSceneMask_.transform.parent = uiRoot.transform; switchSceneMask_.transform.localScale = Vector3.one; switchSceneMask_.SetActive(false); }
private void OnBuyBtn(ButtonScript obj, object args, int param1, int param2) { COM_ADGiftBag msData = GamePlayer.Instance.miaoshaData_; if (msData == null) { return; } if (msData.isflag_) { return; } int smallChangeId = 0; if (msData.price_ == 1) { GlobalValue.Get(Constant.C_SmallChange1ShopID, out smallChangeId); gameHandler.PayProduct(smallChangeId); } else if (msData.price_ == 3) { GlobalValue.Get(Constant.C_SmallChange3ShopID, out smallChangeId); gameHandler.PayProduct(smallChangeId); } }
// Use this for initialization void Start() { // UIManager.SetButtonEventHandler(closeB.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(vip1Btn_.gameObject, EnumButtonEvent.OnClick, OnOpenVip, 1, 0); UIManager.SetButtonEventHandler(vip2Btn_.gameObject, EnumButtonEvent.OnClick, OnOpenVip, 2, 0); UIManager.SetButtonEventHandler(getBtn1.gameObject, EnumButtonEvent.OnClick, OnGetReward, 1, 0); UIManager.SetButtonEventHandler(getBtn2.gameObject, EnumButtonEvent.OnClick, OnGetReward, 2, 0); GamePlayer.Instance.OnVipUpdate += OnUpdateVip; GamePlayer.Instance.vipRewardfigEnvet += new RequestEventHandler <bool> (OnrewardEnvet); int itemId = 0; int itemCount = 1; GlobalValue.Get(Constant.C_Vip1Reward, out itemId); GlobalValue.Get(Constant.C_Vip1RewardNum, out itemCount); ItemCellUI cell = UIManager.Instance.AddItemCellUI(vip1Icon_, (uint)itemId); cell.showTips = true; cell.ItemCount = itemCount; GlobalValue.Get(Constant.C_Vip2Reward, out itemId); GlobalValue.Get(Constant.C_Vip2RewardNum, out itemCount); cell = UIManager.Instance.AddItemCellUI(vip2Icon_, (uint)itemId); cell.showTips = true; cell.ItemCount = itemCount; OnUpdateVip(); }
void OnClickTen(ButtonScript obj, object args, int param1, int param2) { if (BagSystem.instance.BagIsFull()) { return; } int itemCount = BagSystem.instance.GetBagSize(); int bagSize = GamePlayer.Instance.GetIprop(PropertyType.PT_BagNum); int num = bagSize - itemCount; if (num < 10) { PopText.Instance.Show(LanguageManager.instance.GetValue("beibaokongjianbuzu")); return; } isTen = true; isOne = false; int cost = 0; GlobalValue.Get(Constant.C_ZhuanPanTenGo, out cost); if (GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency) < cost) { PopText.Instance.Show(LanguageManager.instance.GetValue("shuijingbuzu")); return; } Reset(); isStart = true; tenBtn.isEnabled = false; oneBtn.isEnabled = false; NetConnection.Instance.zhuanpanGo(10); StartCoroutine(RunLottery()); }
private void OnenterBtn(ButtonScript obj, object args, int param1, int param2) { if (GlobalValue.isBattleScene(StageMgr.Scene_name)) { PopText.Instance.Show(LanguageManager.instance.GetValue("zhanoougoumai"), PopText.WarningType.WT_Warning, true); } else { if (GamePlayer.Instance.isFund_) { PopText.Instance.Show(LanguageManager.instance.GetValue("yijinggoumaiguo")); return; } int growFund = 0; GlobalValue.Get(Constant.C_GrowFundShopID, out growFund); gameHandler.PayProduct(growFund); //StoreUI.SwithShowMe(2); } // MessageBoxUI.ShowMe (LanguageManager.instance.GetValue("querengoumaishuijing"), () => { // if(GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency)<openFund) // { // MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("notEnoughMagicCurrency"), delegate // { // StoreUI.SwithShowMe(1); // }); // return ; // } // NetConnection.Instance.buyFund (0); // }); }
private void OnAddFriendFun(ButtonScript obj, object args, int param1, int param2) { funPane.gameObject.SetActive(false); if (_selectFriend == null) { return; } if (FriendSystem.Instance().GetFriend(_selectFriend.instId_) != null) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("alreadyhave"), null, true); return; } int fMax = 0; GlobalValue.Get(Constant.C_FriendMax, out fMax); if (FriendSystem.Instance().friends_.Count >= fMax) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("addfriend").Replace("{n}", _selectFriend.name_), () => { NetConnection.Instance.addFriend(_selectFriend.instId_); }); }
private void OnAddFriendList(ButtonScript obj, COM_ContactInfo info) { if (info == null) { return; } if (FriendSystem.Instance().GetFriend(info.instId_) != null) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("alreadyhave"), null, true); return; } if (FriendSystem.Instance().friends_.Count >= 100) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } int fMax = 0; GlobalValue.Get(Constant.C_FriendMax, out fMax); if (FriendSystem.Instance().friends_.Count >= fMax) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("addfriend").Replace("{n}", info.name_), () => { NetConnection.Instance.addFriend(info.instId_); }); }
void InitUI() { if (!SignUpManager.Instance.isEmpty()) { GameObject iconBg = null; HookKeeper hk = null; ItemData data = null; ItemCellUI icon = null; for (int i = 1; i < SignUpManager.Instance.MaxCount; ++i) { iconBg = (GameObject)GameObject.Instantiate(IconBg_) as GameObject; iconBg.transform.parent = ListView_.transform; iconBg.transform.localScale = Vector3.one; iconBg.SetActive(true); data = ItemData.GetData(SignUpManager.Instance.GetRewardIDByIndex(i)); hk = iconBg.GetComponent <HookKeeper>(); icon = UIManager.Instance.AddItemCellUI(hk.icon_, (uint)data.id_, 0f, 20f); icon.showTips = true; iconBg.transform.parent = Grid_.transform; } Grid_.Reposition(); } ComboSignUpMonth_.text = System.DateTime.Today.Month.ToString(); GlobalValue.Get(Constant.C_SignPay, out mendCost_); MendSignUpCost_.text = mendCost_.ToString(); }
void Start() { item.SetActive(false); //GuildSystem.updateGuildShopOk += UpdateGuildShopOK; gongxianLable.text = GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).contribution_.ToString(); GlobalValue.Get(Constant.C_FamilyShopConsume, out xiaohao); xiaohaoLable.text = xiaohao.ToString(); UIManager.SetButtonEventHandler(shuaxinBtn.gameObject, EnumButtonEvent.OnClick, onClickRef, 0, 0); COM_GuildShopItem [] shopitem = GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).shopItems_; refXiaohao = Mathf.Pow(2, GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId).shopRefreshTimes_) * xiaohao; xiaohaoLable.text = refXiaohao.ToString(); if (IsRefShopCountDown(GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId))) { shuaxinBtn.isEnabled = false; } UpdateGuildShop(shopitem); if (isShowMe) { CloseBtn.gameObject.SetActive(true); UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, onClickClose, 0, 0); back.gameObject.SetActive(true); } else { CloseBtn.gameObject.SetActive(false); back.gameObject.SetActive(false); } updateRefGuildShopCount(GuildSystem.GetGuildMemberSelf(GamePlayer.Instance.InstId)); }
private void OnClicktanheBtn(ButtonScript obj, object args, int param1, int param2) { int OffineTimeMax = 0; int itemid = 0; GlobalValue.Get(Constant.C_FamilyLeaderOffineTimeMax, out OffineTimeMax); GlobalValue.Get(Constant.C_FamilyLoseLeaderItem, out itemid); uint offlineTime = GuildSystem.GetPremier().offlineTime_; if (GetTime(offlineTime) > OffineTimeMax) { ItemData idata = ItemData.GetData(itemid); if (BagSystem.instance.GetItemCount((uint)itemid) == 0) { PopText.Instance.Show(LanguageManager.instance.GetValue("shangchenggoumai").Replace("{n}", idata.name_)); } else { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("tanhezuzhang"), () => { NetConnection.Instance.familyLoseLeader(); }); } } else { PopText.Instance.Show(LanguageManager.instance.GetValue("tanhecuowu")); } }
void ShowOk(COM_Wish Wish) { DesLable.text = Wish.wish_; GlobalValue.Get(Constant.C_WishShareMoney, out _Money); GlobalValue.Get(Constant.C_WishShareExp, out _Exp); PopText.Instance.Show(LanguageManager.instance.GetValue("xuyuantishi").Replace("{n}", _Money.ToString()).Replace("{n1}", _Exp.ToString())); }
void Start() { UIManager.SetButtonEventHandler(juanXBtn.gameObject, EnumButtonEvent.OnClick, buttonClick, 0, 0); UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, onClickClose, 0, 0); UIManager.SetButtonEventHandler(duihuanBtn.gameObject, EnumButtonEvent.OnClick, onClickduihua, 0, 0); UIManager.SetButtonEventHandler(leftBtn.gameObject, EnumButtonEvent.OnClick, onClickLeft, 0, 0); UIManager.SetButtonEventHandler(rightBtn.gameObject, EnumButtonEvent.OnClick, onClickRight, 0, 0); UIManager.SetButtonEventHandler(tipsCloseBtn.gameObject, EnumButtonEvent.OnClick, onClicktipsCloseBtn, 0, 0); maxMoney = GamePlayer.Instance.GetIprop(PropertyType.PT_Money); moneyinput.value = "0"; FamilyData fa = FamilyData.GetData((int)GuildBuildingType.GBT_Bank, (int)GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_); fads = fa; levelLable.text = GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString(); maxFamilyMoneyLable.text = fa.number_.ToString(); levelSp.spriteName = GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Bank) - 1].level_.ToString(); GlobalValue.Get(Constant.C_FamilyOneDayFundzLose, out weihu); weihuLable.text = (GuildSystem.Mguild.buildings_[((int)GuildBuildingType.GBT_Main) - 1].level_ * weihu).ToString(); curFamilyMoneyLable.text = GuildSystem.Mguild.fundz_.ToString(); GuildSystem.InitGuildDataOk += UpdateGuild; GameManager.Instance.UpdatePlayermake += UpdatePlayerMoneyOk; UpdateGuild(GuildSystem.Mguild); GuildSystem.updateGuildfndzOk += updatefndz; GuildSystem.UpdateGuildLevelok += updateguildLevel; }
void OnClickBegin(ButtonScript obj, object args, int param1, int param2) { int max = 0; GlobalValue.Get(Constant.C_LearnSkillMaxNum, out max); int level = prof.getSkilMaxLevel(skData_._Id); if (level == 0) { PopText.Instance.Show(LanguageManager.instance.GetValue("learnSkillJobNotMatch")); return; } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < skData_._LearnLv) { PopText.Instance.Show(LanguageManager.instance.GetValue("skillLevel").Replace("{n}", skData_._LearnLv.ToString())); return; } else if (GamePlayer.Instance.Properties[(int)PropertyType.PT_Money] < skData_._LearnCoin) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_MoneyLess")); return; } else if (IsAlreadyLearnedSkills(SkpData._Id)) { PopText.Instance.Show(LanguageManager.instance.GetValue("learnSkillReplice")); return; } else if (skData_._LearnQuestID != 0 && !QuestSystem.IsComplate(skData_._LearnQuestID)) { QuestData qd = QuestData.GetData(skData_._LearnQuestID); if (qd != null) { if (QuestSystem.IsComplate(qd.id_)) { PopText.Instance.Show(LanguageManager.instance.GetValue("YouHadQuest")); return; } else if (QuestSystem.IsQuestDoing(qd.id_)) { PopText.Instance.Show(LanguageManager.instance.GetValue("YouHadComplateQuest")); return; } string msg = LanguageManager.instance.GetValue("YouNeedDoThisQuest") + StringTool.MakeNGUIStringInfoFmt(skData_._LearnQuestID.ToString(), qd.questName_); MessageBoxUI.ShowMe(msg, null, true, null, __TryGotoQuestNpc); } //PopText.Instance.Show("任务没有完成"); } else if (GetLearaSkillNum() >= max) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_SkillSoltFull")); return; } else { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("learSkill"), __NormalLearnSkill); } }
void OnClickJHY(ButtonScript obj, object args, int param1, int param2) { if (!GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Friend)) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyouWeikai")); } else if (!(((PlayerInst.openSubSystemFlag_) & (0x1 << (int)OpenSubSystemFlag.OSSF_Friend)) != 0)) { PopText.Instance.Show(LanguageManager.instance.GetValue("Duifanghaoyou")); } else { if (FriendSystem.Instance().IsmyFriend((int)PlayerInst.instId_)) { PopText.Instance.Show(LanguageManager.instance.GetValue("alreadyhave")); } else { int fMax = 0; GlobalValue.Get(Constant.C_FriendMax, out fMax); if (FriendSystem.Instance().friends_.Count >= fMax) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } NetConnection.Instance.addFriend((uint)PlayerInst.instId_); } gameObject.SetActive(false); } }
public static void InitMySelling(COM_SellItem[] items) { Open_ = true; mySellingList_ = new List <COM_SellItem>(items); collectionList_ = new List <string>(LoadCollection()); GlobalValue.Get(Constant.C_AucGoodProtect, out GoodProtectDay); }
void UpdateItemCount() { int itemID = 0; GlobalValue.Get(Constant.C_CatchPetItemID, out itemID); int num = BagSystem.instance.GetItemMaxNum((uint)itemID); catchItemNum.GetComponent <UILabel>().text = string.Format("[b]{0}[-]", num.ToString()); }
void OnOpenVip(ButtonScript obj, object args, int param1, int param2) { // param1 == 1 vip1, param1 == 2 vip2. if (GamePlayer.Instance.vipLevel_ == 2) { if (param1 == 1) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("vip2Tovip1"), null, true); } else { PopText.Instance.Show(LanguageManager.instance.GetValue("alreadyVip2")); } } else if (GamePlayer.Instance.vipLevel_ == 1) { if (param1 == 2) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("vip1Tovip2"), () => { // send message to recharge vip2. //COM_Chat info = new COM_Chat(); //info.content_ = "openvip 2 2592000"; //info.ck_ = ChatKind.CK_GM; //NetConnection.Instance.sendChat(info, ""); int vip2Id; GlobalValue.Get(Constant.C_Vip2ShopID, out vip2Id); gameHandler.PayProduct(vip2Id); }); } else { PopText.Instance.Show(LanguageManager.instance.GetValue("alreadyVip1")); } } else { // send message to recharge param1. //COM_Chat info = new COM_Chat(); //info.content_ = "openvip " + param1.ToString() + " 2592000"; //info.ck_ = ChatKind.CK_GM; //NetConnection.Instance.sendChat(info, ""); if (param1 == 1) { int vip1Id; GlobalValue.Get(Constant.C_Vip1ShopID, out vip1Id); gameHandler.PayProduct(vip1Id); } else { int vip2Id; GlobalValue.Get(Constant.C_Vip2ShopID, out vip2Id); gameHandler.PayProduct(vip2Id); } } }
void Start() { UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(EnterBtn.gameObject, EnumButtonEvent.OnClick, OnClickEnter, 0, 0); UIManager.SetButtonEventHandler(cancelBtn.gameObject, EnumButtonEvent.OnClick, OnClickcancel, 0, 0); GlobalValue.Get(Constant.C_CreateGuildGold, out jinbi); jinbiLbel.text = jinbi.ToString(); GlobalValue.Get(Constant.C_CreateGuildLevel, out level); levelLabel.text = level.ToString(); GuildSystem.UpdateGuildInfo += UpdateUI; }
void OnItemDelete(COM_Item inst) { int itemID = 0; GlobalValue.Get(Constant.C_CatchPetItemID, out itemID); if (inst.itemId_ == itemID) { int num = BagSystem.instance.GetItemMaxNum((uint)itemID); catchItemNum.GetComponent <UILabel>().text = string.Format("[b]{0}[-]", num.ToString()); } }
void OnClickAddBtn(ButtonScript obj, object args, int param1, int param2) { int fMax = 0; GlobalValue.Get(Constant.C_FriendMax, out fMax); if (FriendSystem.Instance().friends_.Count >= fMax) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } NetConnection.Instance.addFriend(WishingTreeSystem._Wish.playerInstId_); }
// Update is called once per frame void Update() { if (!string.IsNullOrEmpty(price_.value)) { int maxCoin = 0; GlobalValue.Get(Constant.C_MoneyMax, out maxCoin); if (long.Parse(price_.value) > maxCoin) { price_.value = maxCoin.ToString(); } } }
void updateguildLevel(GuildBuildingType type, COM_GuildBuilding building) { if (type == GuildBuildingType.GBT_Bank) { FamilyData fa = FamilyData.GetData((int)type, (int)building.level_); fads = fa; levelLable.text = building.level_.ToString(); maxFamilyMoneyLable.text = fa.number_.ToString(); levelSp.spriteName = building.level_.ToString(); GlobalValue.Get(Constant.C_FamilyOneDayFundzLose, out weihu); curFamilyMoneyLable.text = GuildSystem.Mguild.fundz_.ToString(); } }
private void OnTenBtn(ButtonScript obj, object args, int param1, int param2) { if (_GatherId == 0) { PopText.Instance.Show(LanguageManager.instance.GetValue("qingxuanzhecaiji")); return; } GatherData gd = GatherData.GetGather(_GatherId); COM_Gather gatherD = GatherSystem.instance.GetOpenGather(_GatherId); int maxNum = 0; GlobalValue.Get(Constant.C_GatherNumMax, out maxNum); if (gatherD != null) { if (maxNum - gatherD.num_ < 10) { PopText.Instance.Show(LanguageManager.instance.GetValue("gathertennoNum")); return; } if (gatherD.num_ >= maxNum) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_GatherTimesLess")); return; } } int tenMoney = 0; if (gatherD == null) { for (int i = 1; i <= 10; i++) { tenMoney += (0 + i - 1) / 5 * gd._AddMoney + gd._Money; } } else { for (int i = 1; i <= 10; i++) { tenMoney += ((int)gatherD.num_ + i - 1) / 5 * gd._AddMoney + gd._Money; } } if (tenMoney > GamePlayer.Instance.GetIprop(PropertyType.PT_Money)) { PopText.Instance.Show(LanguageManager.instance.GetValue("nomoney"), PopText.WarningType.WT_Tip); return; } MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chouxiaohanjq").Replace("{n}", tenMoney.ToString()), () => { GatherSystem.instance.Gather(_GatherId, 10); }); }
private void OnClickEnter(ButtonScript obj, object args, int param1, int param2) { int createItemid = 0; GlobalValue.Get(Constant.C_CreateGuildItem, out createItemid); if (input.value.Equals("")) { PopText.Instance.Show(LanguageManager.instance.GetValue("jiazumingbunengkong")); return; } Regex reg = new Regex("^[\u4e00-\u9fa5\\w]+$"); if (!reg.IsMatch(input.value)) { PopText.Instance.Show(LanguageManager.instance.GetValue("NoSymbol")); } else { if (GamePlayer.Instance.GetIprop(PropertyType.PT_Money) < jinbi) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_MoneyLess")); } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < level) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_OpenBaoXiangLevel")); } else { string inputValue = input.value; if (Filt(ref inputValue, 0, 1)) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_PlayerNameSame")); } else { if (BagSystem.instance.GetItemByItemId((uint)createItemid) != null) { NetConnection.Instance.createGuild(input.value); } else { ItemData idd = ItemData.GetData(createItemid); PopText.Instance.Show(LanguageManager.instance.GetValue("createGuildItem").Replace("{n}", idd.name_)); } } } } }
void Start() { int hpid = 0; HeadIconLoader.Instance.LoadIcon("leijichongzhi1", back); GlobalValue.Get(Constant.C_PhoneItem, out hpid); UIManager.Instance.AddItemCellUI(iconKung, (uint)hpid).showTips = true; UIManager.SetButtonEventHandler(huoquBtn.gameObject, EnumButtonEvent.OnClick, OnClickhuoquBtn, 0, 0); UIManager.SetButtonEventHandler(enterBtn.gameObject, EnumButtonEvent.OnClick, OnClickenterBtn, 0, 0); if (!string.IsNullOrEmpty(GameManager.Instance.mobileNum)) { phoneNumInput.value = GameManager.Instance.mobileNum; } }
void Start() { FamilySystem.instance.FamilyMyDataEvent += new RequestEventHandler <int> (OnSkillExpEnevt); GamePlayer.Instance.OnIPropUpdate += UpdateMoney; UIManager.SetButtonEventHandler(levelUpBtn.gameObject, EnumButtonEvent.OnClick, OnClickLevelUp, 0, 0); for (int i = 0; i < cellList.Count; i++) { UIManager.SetButtonEventHandler(cellList[i].gameObject, EnumButtonEvent.OnClick, OnClickItemCell, 0, 0); } GlobalValue.Get(Constant.C_FamilyLearnSkillPay, out _familyLearnSkillPay); selectCellUI = cellList[0].gameObject.GetComponent <familyZhufuCellUI> (); selectCellUI.selectImg.gameObject.SetActive(true); UpdateInfo(1); }
private void OnFriendBtn(ButtonScript obj, object args, int param1, int param2) { int fMax = 0; GlobalValue.Get(Constant.C_FriendMax, out fMax); if (FriendSystem.Instance().friends_.Count >= fMax) { PopText.Instance.Show(LanguageManager.instance.GetValue("haoyoumax")); return; } MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("addfriend").Replace("{n}", PlayerInfo.instName_), () => { NetConnection.Instance.addFriend(PlayerInfo.instId_); }); }
public static void updateActivityStatus(ActivityType type, bool open) { GlobalValue.Get(Constant.C_ExamOpenLevel, out _ExamOpenLevel); if (type == ActivityType.ACT_Exam) { if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) > _ExamOpenLevel) { _IsOpenExam = open; if (UpdateActivityState != null) { UpdateActivityState(open); } } } }
void Start() { //_CreateTitleLable.text = LanguageManager.instance.GetValue("Team_CreateTitle") //vipmanger = grid_leftlevel.GetComponent<VIPPackageItemManager> (); item_leftlevel.SetActive(false); item_rightlevel.SetActive(false); UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClicClose, 0, 0); UIManager.SetButtonEventHandler(CreateBtn.gameObject, EnumButtonEvent.OnClick, OnClicCreate, 0, 0); item_target.SetActive(false); typeTeam = TeamType.TT_None; for (TeamType i = TeamType.TT_None; i < TeamType.TT_Max; ++i) { GameObject obj = GameObject.Instantiate(item_target) as GameObject; obj.SetActive(true); obj.transform.parent = grid_target.transform; obj.transform.localScale = Vector3.one; obj.transform.localPosition = Vector3.zero; obj.name = Enum.GetName(typeof(TeamType), i); UIManager.SetButtonEventHandler(obj, EnumButtonEvent.OnClick, OnClicTeamType, (int)Enum.Parse(typeof(TeamType), Enum.GetName(typeof(TeamType), i)), 0); obj.GetComponent <TeamTargetCell>().nameLabel.text = LanguageManager.instance.GetValue(Enum.GetName(typeof(TeamType), i)); if (i == typeTeam) { _tcell = obj.GetComponent <TeamTargetCell>(); obj.GetComponent <TeamTargetCell>().iconSp.gameObject.SetActive(true); } else { obj.GetComponent <TeamTargetCell>().iconSp.gameObject.SetActive(false); } } TeamSystem.OnChangeTeam += HideSelf; centerLeft = grid_leftlevel.GetComponent <UICenterOnChild> (); centerLeft.onFinished += OnCenterLeftFinished; centerright = grid_rightlevel.GetComponent <UICenterOnChild> (); centerright.onFinished += OnCenterrightFinished; UIScrollView sc = grid_leftlevel.GetComponentInParent <UIScrollView>(); sc.onDragMoveed = scrollveiwMove; GlobalValue.Get(Constant.C_PlayerMaxLevel, out maxLevel); rightLevel = (int)maxLevel; //VIPPackageItemManager.ScrollviewEventOk += ScrollviewOk; rightScro.onDragFinished += ScrollviewOk; leftScro.onDragFinished += ScrollviewOk; InitLevelLeft(rightLevel - leftLevel + 1); InitLevelRight(rightLevel); }