void SetIsNotFriend() { FriendBtn.spriteSwithList.ApplyAllItem(p => p.ChangeSprite(2)); FriendBtn.SetCallBackFuntion(OnAddFriendClick); FriendBtn.spriteSwithList.ApplyAllItem(p => p.GetComponent <UISprite>().color = Color.white); FriendBtn.SetMyButtonActive(true); EmailBtn.spriteSwithList.ApplyAllItem(p => p.GetComponent <UISprite>().color = Color.gray); EmailBtn.SetMyButtonActive(false); }
void Awake() { UpgradeButton.SetCallBackFuntion(UpgradeSkillEvent); ResetUpgradePanel(); //TODO GuideBtnManager.Instance.RegGuideButton(UpgradeButton.gameObject, UI.MainUI.UIType.SkillMain, SubType.SkillMainUpgrade, out m_guideBtnID); }
void Awake() { if (ItemBtn != null) { ItemBtn.SetCallBackFuntion(OnItemClick); } }
void Awake() { if (ClickItem != null) { ClickItem.SetCallBackFuntion(OnItemClick); } }
public void Init(CommonTitleType leftType, CommonTitleType rightType) { m_leftType = leftType; m_rightType = rightType; LeftAddBtn.SetCallBackFuntion(OnLeftPropertyBtnClick, leftType); RightAddBtn.SetCallBackFuntion(OnRightPropertyBtnClick, rightType); VigourAddBtn.SetCallBackFuntion(OnVigroupPropertyBtnClick); if (leftType == CommonTitleType.Power) { LeftAddBtn.gameObject.SetActive(false); VigourAddBtn.gameObject.SetActive(true); ShowEnemgryLeftTimeBar(null); //LeftIconSprite.ChangeSprite((int)leftType); } else if (leftType == CommonTitleType.Practice) { LeftAddBtn.gameObject.SetActive(true); if (LeftAddBtn.BackgroundSwithList.Length > 0) { LeftAddBtn.BackgroundSwithList[0].gameObject.SetActive(false); } VigourAddBtn.gameObject.SetActive(false); LeftIconSprite.ChangeSprite((int)leftType); } else { LeftAddBtn.gameObject.SetActive(true); VigourAddBtn.gameObject.SetActive(false); LeftIconSprite.ChangeSprite((int)leftType); } RightIconSprite.ChangeSprite((int)rightType); }
void Start() { EquipBtn.SetCallBackFuntion(OnEquipBtnClick); QuitBtn.ApplyAllItem(P => P.SetCallBackFuntion(ClosePanelEvent)); //UIEventManager.Instance.RegisterUIEvent(UIEventType.OpentMainUI, Close); CurrentAtkNumber = HeroAttributeScale.GetScaleAttribute(HeroAttributeScaleType.Display_Combat, PlayerManager.Instance.FindHeroDataModel().UnitValues.sMsgPropCreateEntity_SC_UnitVisibleValue.UNIT_FIELD_FIGHTING); }
void Awake() { IsRelease = true; Button_SwitchIn.SetCallBackFuntion(RecoverSirenHandle, null); Button_SwitchOut.SetCallBackFuntion(ReleaseSirenHandle, null); Button_SwitchOut.gameObject.SetActive(false); }
void setBtnCallback() { StarMatchBtn.SetCallBackFuntion(OnStarMatchBtnClick); InviteBtn_left.SetCallBackFuntion(OnInviteBtnClick); InviteBtn_Right.SetCallBackFuntion(OnInviteBtnClick); CancelTeamBtn.SetCallBackFuntion(OnCancelTeamBtnClick); }
void Awake() { UseBtn.SetCallBackFuntion(OnUseGoodsBtnClick); UseAllBtn.SetCallBackFuntion(OnUseAllGoodsBtnClick); CloseBtn.SetCallBackFuntion(OnClosePanelBtnClick); Close(); }
void Awake() { if (UI.MainUI.MainUIController.Instance.IsShowCommonTool) { CreatObjectToNGUI.InstantiateObj(CommonToolPrefab, transform); } BtnGo.SetCallBackFuntion(CheckQuickJionBackpack); //HelpBtn.SetCallBackFuntion(HelpButtonHandle); //BtnGo.SetButtonText(LanguageTextManager.GetString("IDS_H2_64")); Button_Unknown.SetCallBackFuntion(ShowYaoqiExplanation); Button_Add.SetCallBackFuntion(AddYaoqiValue); Button_Sure.SetCallBackFuntion(CloseYaoqiExplanation); InitPanel(); springPanel.OnDragCallBack = this.OnPageTurning; this.RegisterEventHandler(); ShowBottomBtn(); //TODO GuideBtnManager.Instance.RegGuideButton(BtnGo.gameObject, UIType.Battle, SubType.EctypeBattleGo, out m_guideBtnID[0]); //TODO GuideBtnManager.Instance.RegGuideButton(Button_Unknown.gameObject, UIType.Battle, SubType.ShowYaoqiExp, out m_guideBtnID[1]); //TODO GuideBtnManager.Instance.RegGuideButton(Button_Add.gameObject, UIType.Battle, SubType.AddYaoqiValue, out m_guideBtnID[2]); //TODO GuideBtnManager.Instance.RegGuideButton(Button_Sure.gameObject, UIType.Battle, SubType.CloseYaoqiExp, out m_guideBtnID[3]); UIEventManager.Instance.RegisterUIEvent(UIEventType.EctypePageSkip, EctypePageSkip); GuideBtnManager.Instance.RegDraggablePanel(springPanel.gameObject); //CreatObjectToNGUI.InstantiateObj(UITitlePrefab,transform); }
void Init() { if (isRead) { return; } isRead = true; progressBoxCollider = progressSlider.GetComponent <BoxCollider>(); middleTip.text = LanguageTextManager.GetString("IDS_I34_24"); highTip.text = LanguageTextManager.GetString("IDS_I34_25"); normalBtnWord.text = LanguageTextManager.GetString("IDS_I34_21"); middleBtnWord.text = LanguageTextManager.GetString("IDS_I34_22"); highGradeBtnWord.text = LanguageTextManager.GetString("IDS_I34_23"); btnColse.SetCallBackFuntion(OnBtnColseEvent); selectLeftBtn.SetCallBackFuntion(OnselectLeftBtnEvent); selectRightBtn.SetCallBackFuntion(OnselectRightBtnEvent); sweepTokenBtn.SetCallBackFuntion(OnSweepTokenBtnEvent); normalBtn.SetCallBackFuntion(OnnormalBtnEvent); middleBtn.SetCallBackFuntion(OnmiddleBtnEvent); highGradeBtn.SetCallBackFuntion(OnhighGradeBtnEvent); progressSlider.onValueChange = OnSliderChange; preSweepValue = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_SWEEP_VALUE; UIEventManager.Instance.RegisterUIEvent(UIEventType.EctypeSweepReward, OnEctypeSweepRewardEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.SweepTimesUpdate, OnEctypeSweepUpdateEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.ActiveLifeUpdate, OnEctypeSweepUpdateEvent); }
public void Init() { btnBack.SetCallBackFuntion(OnBtnBackClick); centerObj.SetActive(false); btnBack.gameObject.SetActive(false); prefabIcon.SetActive(false); }
void Init() { if (isRead) { return; } isRead = true; line1Title.text = LanguageTextManager.GetString("IDS_I7_101"); line2Title.text = LanguageTextManager.GetString("IDS_I7_103"); upgradeTitle.text = LanguageTextManager.GetString("IDS_I7_111"); upgradeLvTit.text = LanguageTextManager.GetString("IDS_I7_105"); upgradeMonTit.text = LanguageTextManager.GetString("IDS_I7_112"); advanceTitle.text = LanguageTextManager.GetString("IDS_I7_107"); advanceLvTit.text = LanguageTextManager.GetString("IDS_I7_108"); advanceMonTit.text = LanguageTextManager.GetString("IDS_I7_109"); strengLine1Name.text = LanguageTextManager.GetString("IDS_I7_113"); strengCondiName.text = LanguageTextManager.GetString("IDS_I7_114"); unlockTitle.text = LanguageTextManager.GetString("IDS_I7_104"); unlockCondi.text = LanguageTextManager.GetString("IDS_I7_105"); upgardeBtnWord.text = LanguageTextManager.GetString("IDS_I7_117"); advanceBtnWord.text = LanguageTextManager.GetString("IDS_I7_116"); strengthenBtnWord.text = LanguageTextManager.GetString("IDS_I7_118"); upgradeBtn.SetCallBackFuntion(OnUpgradeEvent); advanceBtn.SetCallBackFuntion(OnAdvanceEvent); strengthenBtn.SetCallBackFuntion(OnStrengthenEvent); advanceIconBtn.SetCallBackFuntion(OnItemBoxEvent); TaskGuideBtnRegister(); }
void Awake() { m_PackRightBtnManager = CreatObjectToNGUI.InstantiateObj(RightBtnManagerPrefab, transform).GetComponent <PackRightBtnManager>(); m_PackRightBtnManager.transform.localPosition = RightBtnHidPos; BesetSuccessEff1 = CreatObjectToNGUI.InstantiateObj(BesetSuccessEff1_profab, transform); SwallowSuccessEff1 = CreatObjectToNGUI.InstantiateObj(SwallowSuccessEff1_prefab, transform); SwallowSuccessEff1.transform.localPosition = new Vector3(0, 0, -25); BesetSuccessEff1.SetActive(false); SwallowSuccessEff1.SetActive(false); //返回按钮点击 BackBtn.SetCallBackFuntion((obj) => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Cancel"); this.Close(); }); //返回按钮按下/松开效果 BackBtn.SetPressCallBack((isPressed) => { BackBtn.spriteSwithList.ApplyAllItem(P => P.ChangeSprite(isPressed ? 2 : 1)); }); m_createInstance = true; var commonPanel = NGUITools.AddChild(gameObject, CommonPanelTitle_Prefab); commonPanel.transform.localPosition = CommonPanelTitle_Prefab.transform.localPosition; commonPanel.GetComponent <CommonPanelTitle>().TweenShow(); //RegisterEventHandler (); TaskGuideBtnRegister(); }
void Start() { BackButton.SetCallBackFuntion(OnBackButtonClick); BackButtonText.SetText(LanguageTextManager.GetString("IDS_H2_8")); JoinGameButton.SetCallBackFuntion(OnJoinGameButtonClick); Show(); }
void Awake() { EquipBtn.SetCallBackFuntion(OnEquipBtnClick); //TODO GuideBtnManager.Instance.RegGuideButton(EquipBtn.gameObject, UIType.Fashion, SubType.FashionEquipBtn, out m_guideBtnID); TaskGuideBtnRegister(); }
void Awake() { BsetItem = CreatObjectToNGUI.InstantiateObj(BesetItem_prafab, Item_point).GetComponent <JewelBset_ContainerItem>(); BsetItem.CanCancel = true; buttonCallBack.SetCallBackFuntion(obj => { SoundManager.Instance.PlaySoundEffect("Sound_Button_Stone_Click"); if (fielInfo != null) { EquiptSlotType place = (EquiptSlotType)int.Parse((fielInfo.LocalItemData as EquipmentData)._vectEquipLoc); List <JewelInfo> jewelInfo = PlayerDataManager.Instance.GetJewelInfo(place); if (_holeIndex == HoleIndex.FirstHole) { if (jewelInfo[0].JewelID != 0) { if (ContainerInfomanager.Instance.PackIsFull()) { MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I9_20"), 1); } else { NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateRemoveCommand(fielInfo.sSyncContainerGoods_SC.uidGoods, 1); } //JewelBesetManager.GetInstance().ShowRemoveJewel1Effect(); //JewelBesetManager.GetInstance().RemoveQueue.Enqueue(1); } else { //Debug.Log(place); JewelBesetManager.GetInstance().UpdateChoseJewelList_Beset(fielInfo, 1); JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelChose_Beset); } } else { if (jewelInfo[1].JewelID != 0) { if (ContainerInfomanager.Instance.PackIsFull()) { MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I9_20"), 1); } else { NetServiceManager.Instance.EquipStrengthenService.SendRequestGoodsOperateRemoveCommand(fielInfo.sSyncContainerGoods_SC.uidGoods, 2); } //JewelBesetManager.GetInstance().ShowRemoveJewel2Effect(); //JewelBesetManager.GetInstance().RemoveQueue.Enqueue(2); } else { JewelBesetManager.GetInstance().UpdateChoseJewelList_Beset(fielInfo, 2); JewelBesetManager.GetInstance().ChangeSubUistate(JewelState.JewelChose_Beset); } } JewelBesetManager.GetInstance().DisableAllHoleButton(); } }); buttonCallBack.SetPressCallBack(OnButtonPress); }
void Init() { if (isRead) { return; } isRead = true; btnBack.SetCallBackFuntion(OnClickBackEvent); skillLinePrefab.SetActive(true); int Count = 4; for (int i = 0; i < Count; i++) { GameObject item = NGUITools.AddChild(skillParentPoint[i], skillLinePrefab); // CreatObjectToNGUI.InstantiateObj(skillLinePrefab,skillParentPoint[i].transform); SkillUpgradeLineItem scrItem = item.GetComponent <SkillUpgradeLineItem>(); skillLineList.Add(scrItem); } skillLinePrefab.SetActive(false); /*for (int i= 0; i < 8; i++) { * var sskillInfo = new SSkillInfo () { wSkillID = (ushort)(60440+i), wSkillLV = (byte)2 }; * PlayerManager.Instance.HeroSMsgSkillInit_SC.UpgradeSkill (sskillInfo); * }*/ skillUpgradeEff.SetActive(false); skillAdvanceEff.SetActive(false); UIEventManager.Instance.RegisterUIEvent(UIEventType.SkillStrengthenEvent, OnStrengthenSuccEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.SkillAdvanceEvent, OnAdvanceSuccEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.UpgrateSkillInfo, OnUpgradeSuccEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.ShopsBuySuccess, OnBuySuccess); comPanelTitle.Init(CommonTitleType.Money, CommonTitleType.GoldIngot); TaskGuideBtnRegister(); }
void Awake() { m_instance = this; UIEventManager.Instance.RegisterUIEvent(UIEventType.SelectRole, SelectRole); BackButton.SetCallBackFuntion(OnBackButtonClick); }
void Awake() { TweenShowElement.alpha = 0; BackButton.SetCallBackFuntion(OnBackButtonClick); Background.alpha = 0; RewardPanelList.ApplyAllItem(P => P.gameObject.GetComponent <UIPanel>().alpha = 0); }
//public GameObject CommonToolPrefab; void Awake() { TreasureTreesFruitPointList = new List <TreasureTreesFruitPoint>(); for (int i = 0; i < TreasureTreeFruitAnchors.Count; i++) { GameObject obj = UI.CreatObjectToNGUI.InstantiateObj(TreasureTreesFruitPointPrefab, TreasureTreeFruitAnchors[i]); TreasureTreesFruitPoint point = obj.GetComponent <TreasureTreesFruitPoint>(); TreasureTreesFruitPointList.Add(point); } //if (UI.MainUI.MainUIController.Instance.IsShowCommonTool) { CreatObjectToNGUI.InstantiateObj(CommonToolPrefab, transform); } for (int i = 0; i < TreasureTreesFruitPointList.Count; i++) { TreasureTreesFruitPointList[i].Init(this, i + 1); } treasureTreesButtonToolManager.Init(this); GetAwardAnimManager.Init(this); FruitLogMessageWindow.Init(this); UIEventManager.Instance.RegisterUIEvent(UIEventType.UpdateTreasureTreesData, UpdatePanel); UIEventManager.Instance.RegisterUIEvent(UIEventType.TreasureTreesUseMana, OnUseManaFromServer); UIEventManager.Instance.RegisterUIEvent(UIEventType.TreasureTreesGetReward, OnGetRewardFromServer); //MainUIController.Instance.SetPanelActivEvent += new MainUIController.SetPanelDelegate(SetPanelActive); InvokeRepeating("ShwoFruitLeftTime", 0, 1); LogPanelBtn.SetCallBackFuntion(FruitLogMessageWindow.ShowPanel); SetNewTipShow(false); BackButton.SetCallBackFuntion(OnBackButtonTapped); //TODO GuideBtnManager.Instance.RegGuideButton(this.LogPanelBtn.gameObject, UIType.Treasure, SubType.TreasureTreesMainButton, out m_guideBtnID[0]); TaskGuideBtnRegister(); }
void Start() { if (iconBtn != null) { iconBtn.SetCallBackFuntion(OnClickBtnEvent); } }
void Awake() { ViewAtbBtn.SetCallBackFuntion(OnViewAtbBtnClick); AddEventHandler(EventTypeEnum.EntityUpdateValues.ToString(), UpdateViaNotify); UIEventManager.Instance.RegisterUIEvent(UIEventType.ResetContainerGoods, ChangeHeroWeapon); ShowPanelInfo(); }
void Start() { //if(this.Input_Server!=null)this.Input_Server.text = PlayerPrefs.GetString("ServerIP", "127.0.0.1"); //if(UserBtn!=null)UserBtn.SetCallBackFuntion(OnUserBtnClick); RegisterBtn.SetCallBackFuntion(OnRegisterBtnClick); LoginBtn.SetCallBackFuntion(OnLoginBtnClick); }
void Awake() { gameObject.SetActive(false); CloseBtn.SetCallBackFuntion(Close); LastPageBtn.SetCallBackFuntion(OnLastPageBtnClick); NextPageBtn.SetCallBackFuntion(OnNextPageBtnClick); }
private void LoadUI() { if (!m_heroCreated) { if (PlayerManager.Instance.HeroCreated) { m_heroCreated = true; SysSettingButton.SetCallBackFuntion(ShowBackToTownBox); //ShowSkillButtonUI(); //ShowMagicAndHealthButtonUI(); ShowDoubleHitUI(); ShowBattleRoleStatuUI(); //ShowSpecialSkillUI(); if (m_StoreCoverUI == null) { GameObject storeCoverUI = UI.CreatObjectToNGUI.InstantiateObj(StoreCoverUI, Center); m_StoreCoverUI = storeCoverUI.GetComponent <StoreCoverUI>(); } UI.CreatObjectToNGUI.InstantiateObj(BattleMessageManagerPrefab, Center); } } /*if (GameManager.Instance.isTeamBattleMark) { * UIEventManager.Instance.TriggerUIEvent (UIEventType.LoadingStartDownTime, null); * }*/ //LoadingUI.Instance.StartShowDownTime (); }
void Init() { if (isRead) { return; } isRead = true; //npc展示 NpcObj = GameObject.Instantiate(NPCPrefab) as GameObject; NpcObj.transform.parent = NPCCamera.transform.Find("ModelParent"); NpcObj.transform.localPosition = NpcPos; NpcObj.transform.localRotation = Quaternion.Euler(0, 197f, 0); NpcObj.transform.localScale = Vector3.one; DefaultAnim = "LadyTIdle01"; //NpcObj.animation.clip.name; NpcObj.animation.CrossFade(DefaultAnim); btnBack.SetCallBackFuntion(OnClickBackEvent); btnRefreshNextTimes.SetCallBackFuntion(OnClickNextTimesEvent); btnArrowLeft.SetCallBackFuntion(OnClickLeftEvent); btnArrowRight.SetCallBackFuntion(OnClickRightEvent); btnInfo.SetPressCallBack(OnPressInfoEvent); downTimeNameLabel.text = LanguageTextManager.GetString("IDS_I29_6"); CreateListItem(); NetServiceManager.Instance.TradeService.SendCarryShopUI_CS(0); UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopUIDataEvent, OnRcvCarryShopUIDataEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopBuyEvent, OnRcvCarryShopBuyEvent); UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopUnLockEvent, OnRcvCarryShopUnLockEvent); }
void Awake() { for (int i = 1; i <= 6; i++) { Transform tran = goodListPanel.transform.Find(goodStr + i); GameObject goods = NGUITools.AddChild(tran.gameObject, goodsPerfab); SingleTopUpCardList.Add(goods.gameObject.GetComponent <SingleTopUpCard>()); SingleTopUpCardList[i - 1].Init(true, this, null, i); SingleTopUpCardList[i - 1].PositionX = (i - 1) / 3 + 1; SingleTopUpCardList[i - 1].PositionY = (i - 1) % 3 + 1; } goodsPerfab.SetActive(false); BuyButton.SetCallBackFuntion(OnBuyButtonClick); btnBack.SetCallBackFuntion(OnBackButtonTapped); //npc展示 NpcObj = GameObject.Instantiate(NPCPrefab) as GameObject; NpcObj.transform.parent = NPCCamera.transform.Find("ModelParent"); NpcObj.transform.localPosition = NpcPos; NpcObj.transform.localRotation = Quaternion.Euler(0, 197f, 0); NpcObj.transform.localScale = Vector3.one; DefaultAnim = NpcObj.animation.clip.name; UIEventManager.Instance.RegisterUIEvent(UIEventType.VipGradeUpdate, OnVipGradeUpdate); UIEventManager.Instance.RegisterUIEvent(UIEventType.VipPaySuccess, OnVipPaySuccess); vipPanel.Init(this); originalPos = payPanel.transform.localPosition; GameObject go = UI.CreatObjectToNGUI.InstantiateObj(powersPanel, powersParent.transform); powerPanelScript = go.GetComponent <VipPrevillegePanelController>(); //Invoke ("Test",8); }
void Awake() { JoystickBtn.SetCallBackFuntion(OnModelBtnClick, btnType.JoyStick); NormalBtn.SetCallBackFuntion(OnModelBtnClick, btnType.NorMal); SureBtn.SetCallBackFuntion(OnSureBtnClick); OnModelBtnClick(btnType.None); }
void Awake() { // if (UI.MainUI.MainUIController.Instance.IsShowCommonTool) { CreatObjectToNGUI.InstantiateObj(CommonToolPrefab, transform); } OpenBaseSkillBtn.SetCallBackFuntion(OnOpenBaseSkillBtnClick); CloseBaseSkillBtn.SetCallBackFuntion(OnCloseBaseSkillBtnClick); EnabelJoyStickBtn.SetCallBackFuntion(OnEnabelJoyStickBtnClick); DisabelJoyStickBtn.SetCallBackFuntion(OnDesabelJoyStickBtnClick); if (ShowHurtNumBtn && HideHurtNumBtn) { ShowHurtNumBtn.SetCallBackFuntion(ShowHurtNumBtnClick); HideHurtNumBtn.SetCallBackFuntion(HideHurtNumBtnClick); } QuitBtn.SetCallBackFuntion(OnQuitBtnClick); BackBtn.SetCallBackFuntion(OnBackButtonTapped); MusicBar.onValueChange += OnMusicBarChange; SoundBar.onValueChange += OnSoundBarChange; ViewBar.onValueChange += OnDragViewBarFinish; MagicTypeBtn.SetCallBackFuntion(OnMagicTypeBtnClick); ControllerTypeBtn.SetCallBackFuntion(OnControllerTypeBtnClick); MusicBar.sliderValue = GameManager.Instance.m_gameSettings.BgmVolume; SoundBar.sliderValue = GameManager.Instance.m_gameSettings.SfxVolume; ViewBar.sliderValue = (GameManager.Instance.m_gameSettings.GameViewLevel) / (float)(CommonDefineManager.Instance.CommonDefineFile._dataTable.CameraDistanceList.Count - 1); MagicBtnType = GameManager.Instance.m_gameSettings.DoubleClickSkill; MagicTypeBtn.SetButtonBackground(MagicBtnType ? 2 : 1); ResetBaseSkillBtnStatus(); ResetJoyBtnStatus(); ResetHurtNumStatus(); UserID.SetText(string.Format(LanguageTextManager.GetString("IDS_I30_6"), PlayerManager.Instance.FindHeroDataModel().ActorID)); }