void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(getRewordBtn.gameObject, EnumButtonEvent.OnClick, OnGetRewrad, 0, 0); UIManager.SetButtonEventHandler(delMailBtn.gameObject, EnumButtonEvent.OnClick, DelMail, 0, 0); EmailSystem.instance.mailEnven += new RequestEventHandler <bool> (OnMailEvent); EmailSystem.instance.UpdatemailEnven += new RequestEventHandler <COM_Mail> (OnUpdateMailEvent); emialTitelLab.text = LanguageManager.instance.GetValue("emialTitelLab"); emialNothinglLab.text = LanguageManager.instance.GetValue("emialNothinglLab"); if (EmailSystem.instance.Mails != null && EmailSystem.instance.Mails.Length > 0) { noMailLab.gameObject.SetActive(false); } else { noMailLab.gameObject.SetActive(true); } OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { UpdateList(); }); }
void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(levelUpBtn.gameObject, EnumButtonEvent.OnClick, OnClickLevelUp, 0, 0); UIManager.SetButtonEventHandler(tuPoBtn.gameObject, EnumButtonEvent.OnClick, OnClickTuPo, 0, 0); UIManager.SetButtonEventHandler(huanBtn.gameObject, EnumButtonEvent.OnClick, OnClickHuan, 0, 0); GamePlayer.Instance.MagicItmeEnvet += new RequestEventHandler <int> (OnMagicLevelEvent); GamePlayer.Instance.MagicItmeJobEnvet += new RequestEventHandler <int> (OnMagicJobEvent); GamePlayer.Instance.MagicItmeTupoEnvet += new RequestEventHandler <int> (OnMagicTupoEnvet); UIManager.Instance.LoadMoneyUI(this.gameObject); MagicTitleLab.text = LanguageManager.instance.GetValue("MagicTitleLab"); MagicSelectItemLab.text = LanguageManager.instance.GetValue("MagicSelectItemLab"); MagicUIInfoLab.text = LanguageManager.instance.GetValue("MagicUIInfoLab"); MagicSelectItem1Lab.text = LanguageManager.instance.GetValue("MagicSelectItem1Lab"); MagiclevelBtnLab.text = LanguageManager.instance.GetValue("MagiclevelBtnLab"); MagicTupoBtnLab.text = LanguageManager.instance.GetValue("MagicTupoBtnLab"); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { levelUpObj.GetComponent <magicItemLevelUpUI> ().UpdataItems(); GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_MainMagicUIOpen); }); levelUpBtn.isEnabled = false; }
void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(startBtn.gameObject, EnumButtonEvent.OnClick, OnStart, 0, 0); UIManager.SetButtonEventHandler(stopBtn.gameObject, EnumButtonEvent.OnClick, OnStop, 0, 0); ArenaPvpSystem.Instance.PvpMatchingEnven += new RequestEventHandler <bool>(PvpMatching); ArenaPvpSystem.Instance.playerTeamEnven += new RequestEventHandler <COM_SimpleInformation[]>(PvpTeamEnven); ArenaPvpSystem.Instance.playerSingleEnven += new RequestEventHandler <COM_SimpleInformation>(PvpSingleEnven); TeamSystem.OnUpdateTeamMB += UpdateTeamMBOk; TeamSystem.OnDelMenber += OnDelTeamPlayerEnvt; UpdateMyInfo(); ArenaSystem.Instance.openPvP = true; ArenaPvpSystem.Instance.openPvpUI = true; OpenPanelAnimator.PlayOpenAnimation(this.panel); GameManager.chatobj.SetActive(true); Vector3 chatPos = new Vector3(); chatPos = GameManager.chatobj.transform.localPosition; UIManager.Instance.AdjustUIDepth(GameManager.chatobj.transform); GameManager.chatobj.transform.localPosition = chatPos; startBtn.gameObject.SetActive(false); stopBtn.gameObject.SetActive(false); if (TeamSystem.IsTeamLeader()) { startBtn.gameObject.SetActive(true); } }
void Start() { btns.Add(allBtn); btns.Add(growingUpbtn); btns.Add(fightBtn); btns.Add(babyBtn); btns.Add(frBtn); btns.Add(tujianBtn); item.SetActive(false); _SuccessTitleLable.text = LanguageManager.instance.GetValue("Success_Title"); _SuccessJDLable.text = LanguageManager.instance.GetValue("Success_SuccessJD"); _SuccessLQLable.text = LanguageManager.instance.GetValue("Success_SuccessLQ"); UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); for (int i = 0; i < btns.Count; i++) { UIManager.SetButtonEventHandler(btns[i].gameObject, EnumButtonEvent.OnClick, OnClickbtn, i, 0); } GamePlayer.Instance.OnAchievementUpdate += Receive; OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { ButtonSelect(0); UpdateUI(); GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_AchievementUIOpen); }); }
// Use this for initialization void Start() { listPanel_ = scroView.gameObject.GetComponent <UIPanel>(); listDragArea_ = scroView.gameObject.GetComponent <BoxCollider>(); AuctionHouseSystem.OnSellListUpdate += OnSellListUpdate; AuctionHouseSystem.OnMySellingListUpdate += OnMySellingUpdate; GamePlayer.Instance.OnBabyUpdate += UpdateSubContent; GamePlayer.Instance.OnIPropUpdate += OnDiamondUpdate; UIManager.SetButtonEventHandler(closeBtn_.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(searchBtn_.gameObject, EnumButtonEvent.OnClick, OnSearch, 0, 0); UIManager.SetButtonEventHandler(buyBtn_.gameObject, EnumButtonEvent.OnClick, OnBuy, 0, 0); UIManager.SetButtonEventHandler(pageUpBtn_.gameObject, EnumButtonEvent.OnClick, OnPageUpdate, -1, 0); UIManager.SetButtonEventHandler(pageDownBtn_.gameObject, EnumButtonEvent.OnClick, OnPageUpdate, 1, 0); UIManager.SetButtonEventHandler(buyTab_.gameObject, EnumButtonEvent.OnClick, OnDisplay, (int)DisplayType.DT_Buy, 0); UIManager.SetButtonEventHandler(sellTab_.gameObject, EnumButtonEvent.OnClick, OnDisplay, (int)DisplayType.DT_Sell, 0); UIManager.SetButtonEventHandler(collectBtn_.gameObject, EnumButtonEvent.OnClick, OnCollect, 0, 0); UIManager.SetButtonEventHandler(sellRecordBtn_.gameObject, EnumButtonEvent.OnClick, OnRecord, 0, 0); UIManager.SetButtonEventHandler(itemSubTab_.gameObject, EnumButtonEvent.OnClick, OnBagTab, (int)BagType.BT_Item, itemSubTab_CrtPage_); UIManager.SetButtonEventHandler(babySubTab_.gameObject, EnumButtonEvent.OnClick, OnBagTab, (int)BagType.BT_Baby, babySubTab_CrtPage_); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { SelectDisplayGroup(DisplayType.DT_Buy); DisplaySellTab(); OnDiamondUpdate(); //selectedItemSubTabBtnForIndex(itemSubTab_CrtPage_); //selectedbabySubTabBtnForIndex (babySubTab_CrtPage_); }); }
void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); GamePlayer.Instance.OnIPropUpdate += UpdateMoney; OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { UpdateBuyList(); }); }
void Start() { //InitUIText (); isOpen = true; UIManager.SetButtonEventHandler(InlayGem.gameObject, EnumButtonEvent.OnClick, OnGem, 0, 0); UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(gemCloseBtn.gameObject, EnumButtonEvent.OnClick, OnCloseGem, 0, 0); UIManager.SetButtonEventHandler(compoundBtn.gameObject, EnumButtonEvent.OnClick, OnCompound, 0, 0); UIManager.SetButtonEventHandler(wuQiBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 2, 0); UIManager.SetButtonEventHandler(maoZiBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 4, 0); UIManager.SetButtonEventHandler(kuiJiaBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 6, 0); UIManager.SetButtonEventHandler(xieZiBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 1, 0); UIManager.SetButtonEventHandler(dunPaiBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 7, 0); UIManager.SetButtonEventHandler(compoundOkBtn.gameObject, EnumButtonEvent.OnClick, OnCompoundOk, 0, 0); UIManager.SetButtonEventHandler(geamBack.gameObject, EnumButtonEvent.OnClick, OnCloseGem, 0, 0); UIManager.SetButtonEventHandler(buyGemBtn.gameObject, EnumButtonEvent.OnClick, OnBuyGem, 0, 0); UIManager.SetButtonEventHandler(jobEquipBtn.gameObject, EnumButtonEvent.OnClick, OnEquipType, 8, 0); UIManager.SetButtonEventHandler(pobiaoBtn.gameObject, EnumButtonEvent.OnClick, OnEquipPoBiao, 8, 0); for (int i = 0; i < needItemsIcon.Count; i++) { UIManager.SetButtonEventHandler(needItemsIcon[i].gameObject, EnumButtonEvent.OnClick, OnNeedItem, 0, 0); } UIManager.SetButtonEventHandler(peifangIcon.gameObject, EnumButtonEvent.OnClick, OnNeedItem, 0, 0); GatherSystem.instance.CompoundOkEvent += new RequestEventHandler <COM_Item> (MakeOk); GatherSystem.instance._GatherItemHandler += new GatherItemHandler(UpdateNeedMakeItem); BagSystem.instance.UpdateItemEvent += new ItemUpdateEventHandler(UpdateAddMakeItem); BagSystem.instance.ItemChanged += new ItemChangedEventHandler(UpdateAddMakeItem); GamePlayer.Instance.OnIPropUpdate += UpdateMoney; isItemEnough = true; //UpdateSkillList (); compoundBtn.isEnabled = false; InlayGem.gameObject.SetActive(false); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { SetBtnEnabled(true); jobEquipBtn.isEnabled = false; _bJobEquip = true; _selectLevel = 1; _selectEquipType = (int)EquipmentSlot.ES_SingleHand; UpdateSkillList(); if (_bTiSheng) { // SelectItem(); } }); UIManager.Instance.LoadMoneyUI(gameObject); GuideManager.Instance.RegistGuideAim(compoundBtn.gameObject, GuideAimType.GAT_MainMakeCompoundBtn); GuideManager.Instance.RegistGuideAim(InlayGem.gameObject, GuideAimType.GAT_MainMakeGemBtn); GuideManager.Instance.RegistGuideAim(gemCloseBtn.gameObject, GuideAimType.GAT_MainMakeGemClose); }
void Start() { _instance = this; UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(gatherBtn.gameObject, EnumButtonEvent.OnClick, OnClickGather, 0, 0); UIManager.SetButtonEventHandler(compoundBtn.gameObject, EnumButtonEvent.OnClick, OnClickCompound, 0, 0); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { // _gathePane.GetComponent<GatherUI> ().UpdateSkillList(); _compoundPane.GetComponent <CompoundUI>().UpdateSkillList(); compoundBtn.isEnabled = false; }); }
void Start() { _BankTitle.text = LanguageManager.instance.GetValue("bank_Title"); _BankBaby.text = LanguageManager.instance.GetValue("bank_Baby"); _BankItems.text = LanguageManager.instance.GetValue("bank_Items"); UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(daojuBtn.gameObject, EnumButtonEvent.OnClick, OnClickdaoju, 0, 0); UIManager.SetButtonEventHandler(babyBtn.gameObject, EnumButtonEvent.OnClick, OnClickbaby, 0, 0); //roleObj = BagUI.Instance.GetRole (); // if (roleObj != null) // roleObj.SetActive (false); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { if (panelId == 1) { daojuBtn.isEnabled = false; babyBtn.isEnabled = true; if (babyObj != null) { babyObj.SetActive(false); } if (PropsbackObj != null) { PropsbackObj.SetActive(true); } else { LoadUI(UIASSETS_ID.UIASSETS_BankPropspanel); } } else if (panelId == 2) { daojuBtn.isEnabled = true; babyBtn.isEnabled = false; if (PropsbackObj != null) { PropsbackObj.SetActive(false); } if (babyObj != null) { babyObj.SetActive(true); } else { LoadBabyUI(UIASSETS_ID.UIASSETS_babyBankPanel); } } UIManager.Instance.AdjustUIDepth(gameObject.transform); }); }
void Start() { titleLab.text = title_; contentLab.text = content_; dayLab.text = date_; OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(okBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(hideBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); }); }
void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(pvpBtn.gameObject, EnumButtonEvent.OnClick, OnPvp, 0, 0); UIManager.SetButtonEventHandler(pveBtn.gameObject, EnumButtonEvent.OnClick, OnPve, 0, 0); OpenPanelAnimator.PlayOpenAnimation(this.panel); GuideManager.Instance.RegistGuideAim(pveBtn.gameObject, GuideAimType.GAT_OfflineJJC); arenaOnlineTitleLab.text = LanguageManager.instance.GetValue("arenaOnlineTitleLab"); arenaOfflineTitleLab.text = LanguageManager.instance.GetValue("arenaOfflineTitleLab"); arenaIn1Lab.text = LanguageManager.instance.GetValue("arenaIn1Lab"); arenaIn2Lab.text = LanguageManager.instance.GetValue("arenaIn1Lab"); arenaOnlineInfoLab.text = LanguageManager.instance.GetValue("arenaOnlineInfoLab"); arenaOfflineInfoLab.text = LanguageManager.instance.GetValue("arenaOfflineInfoLab"); GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_JJCEntryUI); }
void Start() { hasDestroy = false; UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(guideBtn.gameObject, EnumButtonEvent.OnClick, OnClickGuide, 0, 0); UIManager.SetButtonEventHandler(wayBtn.gameObject, EnumButtonEvent.OnClick, OnClickWay, 0, 0); UIManager.SetButtonEventHandler(bookBtn.gameObject, EnumButtonEvent.OnClick, OnClickBook, 0, 0); UIManager.SetButtonEventHandler(strBtn.gameObject, EnumButtonEvent.OnClick, OnClickStr, 0, 0); UIManager.SetButtonEventHandler(qaBtn.gameObject, EnumButtonEvent.OnClick, OnClickQA, 0, 0); strBtn.isEnabled = false; OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { bookObj.GetComponent <HelpBookUI>().UpdateStrBtns(); if (_openfun == 1) { guideBtn.isEnabled = false; wayBtn.isEnabled = true; bookBtn.isEnabled = true; strBtn.isEnabled = true; if (bookObj != null) { bookObj.SetActive(false); } if (wayObj != null) { wayObj.SetActive(false); } if (qaObj != null) { qaObj.SetActive(false); } guideObj.SetActive(true); if (_subFun == 4) { guideObj.GetComponent <HelpGuideUI>().ShowProfession(); } else if (_subFun == 6) { guideObj.GetComponent <HelpGuideUI>().ShowOpenLevel(); } } }); }
void Start() { InitUITex(); NetConnection.Instance.queryGuildList(0); UIManager.SetButtonEventHandler(oneKeyBtn.gameObject, EnumButtonEvent.OnClick, OnClickoneKeyBtn, 0, 0); UIManager.SetButtonEventHandler(LeftBtn.gameObject, EnumButtonEvent.OnClick, OnClickLeft, 0, 0); UIManager.SetButtonEventHandler(rightBtn.gameObject, EnumButtonEvent.OnClick, OnClickright, 0, 0); UIManager.SetButtonEventHandler(createBtn.gameObject, EnumButtonEvent.OnClick, OnClickcreate, 0, 0); UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); GuildSystem.QueryGuildListResultOk += RefreshItemDatas; GuildSystem.UpdateGuildmenbersok += UpdateGuildmenbers; for (int i = 0; i < items.Count; i++) { items[i].SetActive(false); } numLbel.text = 1 + "/" + 1; OpenPanelAnimator.PlayOpenAnimation(this.panel); }
void Start() { InitUIText(); UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); for (int i = 0; i < tabBtns.Count; i++) { UIManager.SetButtonEventHandler(tabBtns[i].gameObject, EnumButtonEvent.OnClick, OnClickTabBtns, i, 0); } // listPanel_ = listViewObj.gameObject.GetComponent<UIPanel>(); // listDragArea_ = grid.gameObject.GetComponent<BoxCollider>(); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { TabsSelect(idxWithShow); TabsSelectTab(idxWithShow); UIManager.Instance.LoadMoneyUI(this.gameObject); if (GamePlayer.Instance.isGetShouchong) { tabBtns[0].gameObject.SetActive(false); } }); HeadIconLoader.Instance.LoadIcon(background_icon, background); HeadIconLoader.Instance.LoadIcon(fanli_icon, fanliicon); }
void Start() { UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(rollBtn.gameObject, EnumButtonEvent.OnClick, OnRoll, 0, 0); UIManager.SetButtonEventHandler(rankBtn.gameObject, EnumButtonEvent.OnClick, OnRank, 0, 0); UIManager.SetButtonEventHandler(buyBtn.gameObject, EnumButtonEvent.OnClick, OnBuy, 0, 0); UIManager.SetButtonEventHandler(rewardIcon.gameObject, EnumButtonEvent.OnClick, OnrewardIcon, 0, 0); UIManager.SetButtonEventHandler(recordListBtn.gameObject, EnumButtonEvent.OnClick, OnRecordList, 0, 0); arenaMyRankLab.text = LanguageManager.instance.GetValue("arenaMyRankLab"); arenaRollBtnLab.text = LanguageManager.instance.GetValue("arenaRollBtnLab"); arenaMyRankInfoLab.text = LanguageManager.instance.GetValue("arenaMyRankInfoLab"); arenaFigthInfoLab.text = LanguageManager.instance.GetValue("arenaFigthInfoLab"); arenaRankBtnLab.text = LanguageManager.instance.GetValue("arenaRankBtnLab"); myNameLab.text = GamePlayer.Instance.InstName; myLevelLab.text = GamePlayer.Instance.GetIprop(PropertyType.PT_Level).ToString(); for (int i = 0; i < challengePlayers.Count; i++) { if (i == challengePlayers.Count - 1) { ArenaPlayerCellUI apcUI = challengePlayers[i].gameObject.GetComponent <ArenaPlayerCellUI>(); GuideManager.Instance.RegistGuideAim(apcUI.challengeBtn.gameObject, GuideAimType.GAT_OfflineJJC4); } UIManager.SetButtonEventHandler(challengePlayers[i].gameObject, EnumButtonEvent.OnClick, OnCheckPlayer, 0, 0); } checkPlayerUI.callBack = closeCheckPlayer; ArenaSystem.Instance.arenaRivalEvent += new ArenaRivalHandler(OnReqsetRival); ArenaSystem.Instance.UpdateArenaEnven += new RequestEventHandler <COM_EndlessStair> (OnUpdateMyInfo); ArenaSystem.Instance.checkPlayerEnven += new RequestEventHandler <COM_SimplePlayerInst> (CheckPlayer); ArenaSystem.Instance.newBattleMsgEnven += new RequestEventHandler <COM_JJCBattleMsg> (OnNewbattleMsg); NetConnection.Instance.requestMyAllbattleMsg(); NetConnection.Instance.requestRival(); NetConnection.Instance.requestMySelfJJCData(); ArenaSystem.Instance.openPvE = true; OpenPanelAnimator.PlayOpenAnimation(this.panel); DropData dropData = DropData.GetData(PvRrewardData.GetRewardData(1)); if (dropData == null) { return; } ItemCellUI itemcell = UIManager.Instance.AddItemCellUI(No1Item0, (uint)dropData.item_1_); itemcell.showTips = true; ItemCellUI itemcell1 = UIManager.Instance.AddItemCellUI(No1Item1, (uint)dropData.item_2); itemcell1.showTips = true; No1Item2.gameObject.SetActive(false); //ItemCellUI itemcell2 = UIManager.Instance.AddItemCellUI (No1Item2,(uint)dropData.item_3); //itemcell2.showTips = true; No1ItemLab0.text = dropData.item_num_1_.ToString(); No1ItemLab1.text = dropData.item_num_2.ToString(); No1ItemLab2.text = dropData.item_num_3.ToString(); GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_OfflineJJCUI); }
void Start() { // //EventMgr.Instance.RegisterEvent(EEventType.EEventType_UpdateEmployessJiuGuanUI , UpdateJIuGuanTabUI ); //EventMgr.Instance.RegisterEvent(EEventType.EEventType_UpdateEmployessShangZhenUI , UpdateShangZhenTabUI ); //EventMgr.Instance.RegisterEvent(EEventType.EEventType_UpdateEmployessLiebiaoUI , UpdateLieBiaoTabUI ); hasDestroy = false; UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); UIManager.SetButtonEventHandler(tavernBtn.gameObject, EnumButtonEvent.OnClick, OnClickTavern, 0, 0); UIManager.SetButtonEventHandler(listBtn.gameObject, EnumButtonEvent.OnClick, OnClickList, 0, 0); UIManager.SetButtonEventHandler(posBtn.gameObject, EnumButtonEvent.OnClick, OnClickPos, 0, 0); UIManager.SetButtonEventHandler(soulBtn.gameObject, EnumButtonEvent.OnClick, OnClickSoul, 0, 0); UIManager.SetButtonEventHandler(tujianBtn.gameObject, EnumButtonEvent.OnClick, OnClickTujian, 0, 0); tavernBtn.isEnabled = false; GamePlayer.Instance.DelEmployeeEnvent += new RequestEventHandler <uint> (OnDelEmployeeEvolveOk); EmployessSystem.instance.employeeRedEnvent += new RequestEventHandler <int> (OnEmployeeRedEvent); tabBtnListLab.text = LanguageManager.instance.GetValue("tabBtnListLab"); tabBtnPosLab.text = LanguageManager.instance.GetValue("tabBtnPosLab"); tabBtnTavernLab.text = LanguageManager.instance.GetValue("tabBtnTavernLab"); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { if (panelId == 1) { if (GamePlayer.Instance.EmployeeList.Count > 0 && GamePlayer.Instance.GetIprop(PropertyType.PT_Level) > 12) { posBtn.isEnabled = true; tavernBtn.isEnabled = true; listBtn.isEnabled = false; tavernObj.gameObject.SetActive(false); if (posObj != null) { posObj.gameObject.SetActive(false); } listObj.gameObject.SetActive(true); listObj.GetComponent <EmployeeControlListUI> ().AddScrollViewItem(GamePlayer.Instance.EmployeeList); } else { posBtn.isEnabled = true; tavernBtn.isEnabled = false; listBtn.isEnabled = true; tavernObj.gameObject.SetActive(true); } } else if (panelId == 2) { posBtn.isEnabled = false; tavernBtn.isEnabled = true; listBtn.isEnabled = true; tavernObj.SetActive(false); listObj.SetActive(false); if (posObj != null) { if (posObj.gameObject.activeSelf) { return; } posObj.gameObject.SetActive(true); posObj.GetComponent <PartnerPostion>().UpdataPanel(); } else { LoadUI(UIASSETS_ID.UIASSETS_EmployeePosPanel); } } else if (panelId == 3) { posBtn.isEnabled = true; tavernBtn.isEnabled = true; listBtn.isEnabled = false; tavernObj.gameObject.SetActive(false); if (posObj != null) { posObj.gameObject.SetActive(false); } listObj.gameObject.SetActive(true); listObj.GetComponent <EmployeeControlListUI> ().AddScrollViewItem(GamePlayer.Instance.EmployeeList); } EmployessSystem.instance.UpdateEmployeeRed(); UIManager.Instance.LoadMoneyUI(this.gameObject); }); GuideManager.Instance.RegistGuideAim(posBtn.gameObject, GuideAimType.GAT_PartnerPositionTab); }
void Start() { iconName_ = new List <string>(); GlobalValue.Get(Constant.C_SkillExpItem, out itemid); kjBtn.gameObject.SetActive(false); messageObj.SetActive(false); UIManager.SetButtonEventHandler(kjBtn.gameObject, EnumButtonEvent.OnClick, OnkjBtn, 0, 0); UIManager.SetButtonEventHandler(closeBtn.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(forgetBtn.gameObject, EnumButtonEvent.OnClick, OnForgetBtn, 0, 0); UIManager.SetButtonEventHandler(learnBtn.gameObject, EnumButtonEvent.OnClick, OnLearnBtn, 0, 0); UIManager.SetButtonEventHandler(wenhaoBtn.gameObject, EnumButtonEvent.OnClick, OnWenhaoBtn, 0, 0); UIManager.SetButtonEventHandler(battleBtn.gameObject, EnumButtonEvent.OnClick, OnBattleBtn, 0, 0); UIManager.SetButtonEventHandler(liftBtn.gameObject, EnumButtonEvent.OnClick, OnLiftBtn, 0, 0); GamePlayer.Instance.SkillExpEnvet += new RequestEventHandler <int> (OnSkillExpEnevt); List <COM_Skill> skills = GetMianSkillList(); skillNumLab.text = skills.Count + "/10"; expLab.text = ""; _profType = GamePlayer.Instance.GetIprop(PropertyType.PT_Profession); _profLevel = GamePlayer.Instance.GetIprop(PropertyType.PT_ProfessionLevel); _profData = Profession.get((JobType)_profType, _profLevel); zhiyeLab.text = _profData.jobName_; OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { for (int i = 0; i < skills.Count; i++) { GameObject obj = Object.Instantiate(skillCell.gameObject) as GameObject; obj.SetActive(true); SkillData sData = SkillData.GetData((int)skills[i].skillID_, (int)skills[i].skillLevel_); SkillCellUI sCell = obj.GetComponent <SkillCellUI>(); obj.name = sData._Name; sCell.SkillName.text = sData._Name; sCell.SkillLevel.text = sData._Level.ToString(); HeadIconLoader.Instance.LoadIcon(sData._ResIconName, obj.GetComponent <SkillCellUI>().SkillIcon); if (!iconName_.Contains(sData._ResIconName)) { iconName_.Add(sData._ResIconName); } sCell.data = sData; sCell.skillInst = skills[i]; if (_profData.isProudSkill(_profType, (int)skills[i].skillID_, _profLevel)) { obj.transform.FindChild("deyi").GetComponent <UISprite>().gameObject.SetActive(true); } UIManager.SetButtonEventHandler(obj, EnumButtonEvent.OnClick, OnClickMainSkill, 0, 0); skillGrid.AddChild(obj.transform); _mainSkillList.Add(obj); obj.transform.localScale = Vector3.one; } expbar.gameObject.SetActive(true); forgetBtn.gameObject.SetActive(false); learnBtn.gameObject.SetActive(false); curCell = null; if (_mainSkillList.Count > 0) { // UpdateSKillInfoLevel (_mainSkillList[0].name); curCell = _mainSkillList[0].GetComponent <SkillCellUI> (); curCell.back.gameObject.SetActive(true); //curCell.buleBack0.gameObject.SetActive (true); //curCell.buleBack1.gameObject.SetActive (true); UpdatetopInfo(_mainSkillList[0].GetComponent <SkillCellUI> ()); } if (skillType_ != 0) { liftBtn.isEnabled = false; skillObj.gameObject.SetActive(false); gatherObj.gameObject.SetActive(true); gatherObj.GetComponent <GatherUI> ().ShowMe(minType_, minId_); } else { battleBtn.isEnabled = false; } GamePlayer.Instance.forgetSkillEnvet += new RequestEventHandler <uint> (OnForgetEnvet); }); }
void Start() { UIManager.SetButtonEventHandler(close_.gameObject, EnumButtonEvent.OnClick, OnClose, 0, 0); UIManager.SetButtonEventHandler(closeFindBtn.gameObject, EnumButtonEvent.OnClick, OnCloseFind, 0, 0); UIManager.SetButtonEventHandler(blackBtn.gameObject, EnumButtonEvent.OnClick, OnInitBlack, 0, 0); UIManager.SetButtonEventHandler(addFriendBtn.gameObject, EnumButtonEvent.OnClick, OnAddFriend, 0, 0); UIManager.SetButtonEventHandler(addBlackBtn.gameObject, EnumButtonEvent.OnClick, OnAddBlack, 0, 0); UIManager.SetButtonEventHandler(funCloseBtn.gameObject, EnumButtonEvent.OnClick, OnCloseFun, 0, 0); UIManager.SetButtonEventHandler(findFriendName.gameObject, EnumButtonEvent.OnClick, OnfindFriend, 0, 0); UIManager.SetButtonEventHandler(findBlackBtn.gameObject, EnumButtonEvent.OnClick, OnFindBlack, 0, 0); UIManager.SetButtonEventHandler(sendChatBtn.gameObject, EnumButtonEvent.OnClick, OnSendChat, 0, 0); UIManager.SetButtonEventHandler(friendTabBtn.gameObject, EnumButtonEvent.OnClick, OnFriendTabBtn, 0, 0); UIManager.SetButtonEventHandler(offTabBtn.gameObject, EnumButtonEvent.OnClick, OnOffTabBtn, 0, 0); UIManager.SetButtonEventHandler(huanBtn.gameObject, EnumButtonEvent.OnClick, OnHuanBtn, 0, 0); UIManager.SetButtonEventHandler(funCloseBack.gameObject, EnumButtonEvent.OnClick, OnCloseFun, 0, 0); UIManager.SetButtonEventHandler(funAddFriend.gameObject, EnumButtonEvent.OnClick, OnAddFriendFun, 0, 0); UIManager.SetButtonEventHandler(faceBtn.gameObject, EnumButtonEvent.OnClick, OnfaceBtn, 0, 0); //选择好友操作按钮. UIManager.SetButtonEventHandler(ctlSendBtn.gameObject, EnumButtonEvent.OnClick, OnCtlSendBtn, 0, 0); UIManager.SetButtonEventHandler(ctlLookBtn.gameObject, EnumButtonEvent.OnClick, OnCtlLookBtn, 0, 0); UIManager.SetButtonEventHandler(ctlTeamBtn.gameObject, EnumButtonEvent.OnClick, OnCtlTeamBtn, 0, 0); UIManager.SetButtonEventHandler(ctlDelBtn.gameObject, EnumButtonEvent.OnClick, OnCtlDelBtn, 0, 0); UIManager.SetButtonEventHandler(ctlBlackBtn.gameObject, EnumButtonEvent.OnClick, OnCtlBlackBtn, 0, 0); UIEventListener.Get(_VoiceBtn.gameObject).onPress = OnPrassVoice; //事件. FriendSystem.Instance().UpdateFriend += new UpdateFriendHandler(OnUpdataFriendList); FriendSystem.Instance().UpdateBlack += new UpdateBlackHandler(OnUpdataBlackList); FriendSystem.Instance().UpdateOffen += new UpdateOffenHandler(OnUpdateOffens); FriendSystem.Instance().FriendChat += new FriendChatHandler(OnFriendChat); FriendSystem.Instance().FindFriendOkEvent += new RequestEventHandler <COM_ContactInfo> (FindFriendOk); FriendSystem.Instance().FindFriendFail += new FindFriendFailHandler(FindFriendFail); FriendSystem.Instance().recommendEvent += new RequestEventHandler <int> (OnRecommendEvent); FriendSystem.Instance().friendOnLineEvent += new RequestEventHandler <bool> (OnLineEvent); NetConnection.Instance.requestFriendList(); ChartsSystem.QueryPlayerEventOk += OnQueryPlayer; GuideManager.Instance.RegistGuideAim(addFriendBtn.gameObject, GuideAimType.GAT_FriendAddBtn); OpenPanelAnimator.PlayOpenAnimation(this.panel, () => { friendGrild.AddChild(friendBtn.transform, 0); //friendBtn.transform.parent = friendGrild.transform; friendBtn.SetActive(true); friendBtn.transform.localScale = Vector3.one; UIManager.SetButtonEventHandler(friendBtn.gameObject, EnumButtonEvent.OnClick, OnClickFirend, 0, 0); friendGrild.AddChild(blackBtn.transform, 1); //blackBtn.transform.parent = friendGrild.transform; blackBtn.SetActive(true); blackBtn.transform.localScale = Vector3.one; UIManager.SetButtonEventHandler(blackBtn.gameObject, EnumButtonEvent.OnClick, OnInitBlack, 0, 0); //friendGrild.Reposition(); friendTabBtn.isEnabled = false; //UpdataFriendList (); FriendSystem.Instance().isOpenFried = true; if (FriendSystem.Instance().offens_.Count > 0) { foreach (COM_ContactInfo f in FriendSystem.Instance().offens_) { if (FriendSystem.Instance().NoChatDict.ContainsKey(f.name_)) { //offTabBtn.GetComponentInChildren<UISprite>().MarkOff(); offTabBtn.GetComponentInChildren <UISprite>().MarkOn(UISprite.MarkAnthor.MA_RightTop, -10, -10); break; } } } GuideManager.Instance.ProcEvent(ScriptGameEvent.SGE_ClickMainFriend); }); audioSO = gameObject.GetComponentInParent <AudioSource> (); InitFace(); if (FriendSystem.Instance().friends_.Count <= 0) { selectChatLab.gameObject.SetActive(false); } }