//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_label_BiaoTi_Label = fastComponent.FastGetComponent <UILabel>("BiaoTi_Label"); if (null == m_label_BiaoTi_Label) { Engine.Utility.Log.Error("m_label_BiaoTi_Label 为空,请检查prefab是否缺乏组件"); } m_btn_btn_Close = fastComponent.FastGetComponent <UIButton>("btn_Close"); if (null == m_btn_btn_Close) { Engine.Utility.Log.Error("m_btn_btn_Close 为空,请检查prefab是否缺乏组件"); } m_ctor_LineScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("LineScrollView"); if (null == m_ctor_LineScrollView) { Engine.Utility.Log.Error("m_ctor_LineScrollView 为空,请检查prefab是否缺乏组件"); } m_trans_UIChangeLineGrid = fastComponent.FastGetComponent <Transform>("UIChangeLineGrid"); if (null == m_trans_UIChangeLineGrid) { Engine.Utility.Log.Error("m_trans_UIChangeLineGrid 为空,请检查prefab是否缺乏组件"); } m_trans_Sigh = fastComponent.FastGetComponent <Transform>("Sigh"); if (null == m_trans_Sigh) { Engine.Utility.Log.Error("m_trans_Sigh 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
protected override void OnLoading() { base.OnLoading(); AdjustUI(); uicamera = Util.UICameraObj.GetComponent <Camera>(); maincamera = Util.MainCameraObj.GetComponent <Camera>(); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_TARGETCHANGE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.SKILLSYSTEM_SHOWDAMAGE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_PROPUPDATE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_HPUPDATE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_MPUPDATE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.SKILLSYSYTEM_TAB, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.PLAYER_FIGHTPOWER_REFRESH, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.SKILL_SHOWPETSKILL, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.TITLE_NEWTITLE, OnEvent);// Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.MAINPANEL_SHOWREDWARING, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.SYSTEM_GAME_READY, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ROBOTCOMBAT_STOP, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ROBOTCOMBAT_START, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_RELIVE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_NEWNAME, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.EJOYSTICKSTABLE, OnEvent); Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.REFRESHTRANSMITPUSHMSGSTATUS, OnEvent); Engine.Utility.TimerAxis.Instance().SetTimer(MAIN_TIMER_ID, 60000, this, Engine.Utility.TimerAxis.INFINITY_CALL, "主界面显示坐标"); InitPkUI(); InitFuncBtns(); InitBtns(); InitTargetUI(); InitShortcutGridGoCache();//快捷使用道具 LoadingSkillPanel(); InitFBWidget(); InitAnswerUI(); FlyFontDataManager.Instance.InitFlyFont(); UIEventListener.Get(m_trans_MainRoleBUffContainer.gameObject).onClick = ShowBuffPanel; UIEventListener.Get(m_trans_TargetBUffContainer.gameObject).onClick = ShowTargetPanel; UIEventListener.Get(m_spriteEx_btnAutoFight.gameObject).onClick = onClick_BtnAI_Btn; if (m_spriteEx_btnAutoFight != null) { m_spriteEx_btnAutoFight.ChangeSprite(1); } InitJoystick(); InitMiniMap(); InitChat(); InitTAB(); if (m_transHateListRoot != null) { enemyListCreator = m_transHateListRoot.GetComponent <UIGridCreatorBase>(); } RefreshTime(); InitGvoice(); }
void InitScrollView() { m_petSettingGridCreator = m_trans_PetScrollView.GetComponent <UIGridCreatorBase>(); if (m_petSettingGridCreator == null) { m_petSettingGridCreator = m_trans_PetScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } // GameObject obj = UIManager.GetResGameObj( GridID.Uipetsettinggrid ) as GameObject; m_petSettingGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_petSettingGridCreator.gridContentOffset = new Vector2(-177, -240); m_petSettingGridCreator.gridWidth = 90; m_petSettingGridCreator.gridHeight = 90; m_petSettingGridCreator.rowcolumLimit = 5; m_petSettingGridCreator.RefreshCheck(); m_petSettingGridCreator.Initialize <UIPetSettingGrid>((uint)GridID.Uipetsettinggrid, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnUpdateUIGrid, OnUIGridEventDlg); // m_petSettingGridCreator.Initialize<UIPetSettingGrid>(obj, OnUpdateUIGrid, OnUIGridEventDlg); Dictionary <uint, IPet> petDic = m_petDataManager.GetPetDic(); int count = 0; if (petDic != null) { count = petDic.Keys.Count; } m_petSettingGridCreator.CreateGrids(count); }
void InitCompoundZFWidgets() { if (IsInitStatus(ForgingPanelMode.CompoundZF)) { return; } SetInitStatus(ForgingPanelMode.CompoundZF, true); m_lst_equipAtts = new List <GameCmd.PairNumber>(); m_lst_checkProtectAttr = new List <uint>(); m_dicPrtAttData = new Dictionary <uint, ProtectAttrData>(); if (null != m_trans_ProtectScrollView && null == m_protectCreator) { m_protectCreator = m_trans_ProtectScrollView.GetComponent <UIGridCreatorBase>(); if (null == m_protectCreator) { m_protectCreator = m_trans_ProtectScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } if (null != m_protectCreator && null != m_trans_UIEquipPropertyProtectGrid) { m_protectCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_protectCreator.gridWidth = 350; m_protectCreator.gridHeight = 105; m_protectCreator.RefreshCheck(); m_protectCreator.Initialize <UIEquipPropertyProtectGrid>(m_trans_UIEquipPropertyProtectGrid.gameObject, OnUpdateGridData, null); } } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_label_BiaoTi_Label = fastComponent.FastGetComponent <UILabel>("BiaoTi_Label"); if (null == m_label_BiaoTi_Label) { Engine.Utility.Log.Error("m_label_BiaoTi_Label 为空,请检查prefab是否缺乏组件"); } m_trans_SellListContent = fastComponent.FastGetComponent <Transform>("SellListContent"); if (null == m_trans_SellListContent) { Engine.Utility.Log.Error("m_trans_SellListContent 为空,请检查prefab是否缺乏组件"); } m_ctor_SellListScrollViewContent = fastComponent.FastGetComponent <UIGridCreatorBase>("SellListScrollViewContent"); if (null == m_ctor_SellListScrollViewContent) { Engine.Utility.Log.Error("m_ctor_SellListScrollViewContent 为空,请检查prefab是否缺乏组件"); } m_label_Title = fastComponent.FastGetComponent <UILabel>("Title"); if (null == m_label_Title) { Engine.Utility.Log.Error("m_label_Title 为空,请检查prefab是否缺乏组件"); } m_btn_close = fastComponent.FastGetComponent <UIButton>("close"); if (null == m_btn_close) { Engine.Utility.Log.Error("m_btn_close 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
/// <summary> /// 初始化组件 /// </summary> private void InitWidget() { //战斗详情 UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uicitywargrid) as UnityEngine.GameObject; m_WarInfoListGridCreator = m_trans_WarInfoScrollView.GetComponent <UIGridCreatorBase>(); if (m_WarInfoListGridCreator == null) { m_WarInfoListGridCreator = m_trans_WarInfoScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } m_WarInfoListGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_WarInfoListGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_WarInfoListGridCreator.gridWidth = 826; m_WarInfoListGridCreator.gridHeight = 46; m_WarInfoListGridCreator.RefreshCheck(); m_WarInfoListGridCreator.Initialize <UICityWarMemberInfoGrid>(obj, OnWarInfoGridDataUpdate, OnWarInfoGridUIEvent); //图腾列表 UnityEngine.GameObject totemObj = UIManager.GetResGameObj(GridID.Uicitywartotemgrid) as UnityEngine.GameObject; m_TotemListGridCreator = m_trans_TotemScrollView.GetComponent <UIGridCreatorBase>(); if (m_TotemListGridCreator == null) { m_TotemListGridCreator = m_trans_TotemScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } m_TotemListGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_TotemListGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_TotemListGridCreator.gridWidth = 300; m_TotemListGridCreator.gridHeight = 76; m_TotemListGridCreator.RefreshCheck(); m_TotemListGridCreator.Initialize <UICityWarTotemGrid>(totemObj, OnTotemGridDataUpdate, OnTotemGridUIEvent); }
/// <summary> /// 初始化界面 /// </summary> void InitTitlePropWidgt() { if (m_titleForeverGridCreator == null || m_titleActivateGridCreator == null) { //永久加成 //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uititlepropgrid) as UnityEngine.GameObject; m_titleForeverGridCreator = m_trans_foreverContent.GetComponent <UIGridCreatorBase>(); if (m_titleForeverGridCreator == null) { m_titleForeverGridCreator = m_trans_foreverContent.gameObject.AddComponent <UIGridCreatorBase>(); } m_titleForeverGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_titleForeverGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_titleForeverGridCreator.gridWidth = 250; m_titleForeverGridCreator.gridHeight = 40; m_titleForeverGridCreator.RefreshCheck(); m_titleForeverGridCreator.Initialize <UITitlePropAddGrid>((uint)GridID.Uititlepropgrid, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnTitleForeverAddPropGridDataUpdate, OnTitlePropGridUIEvent); //激活加成 m_titleActivateGridCreator = m_trans_activateContent.GetComponent <UIGridCreatorBase>(); if (m_titleActivateGridCreator == null) { m_titleActivateGridCreator = m_trans_activateContent.gameObject.AddComponent <UIGridCreatorBase>(); } m_titleActivateGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_titleActivateGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_titleActivateGridCreator.gridWidth = 250; m_titleActivateGridCreator.gridHeight = 40; m_titleActivateGridCreator.RefreshCheck(); m_titleActivateGridCreator.Initialize <UITitlePropAddGrid>((uint)GridID.Uititlepropgrid, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnTitleActivateAddPropGridDataUpdate, OnTitlePropGridUIEvent); } }
void InitWidget() { //左侧页签 if (m_scrollview_growleftscrollview != null) { m_SecondTabCreator = m_scrollview_growleftscrollview.GetComponent <UISecondTabCreatorBase>(); if (m_SecondTabCreator == null) { m_SecondTabCreator = m_scrollview_growleftscrollview.gameObject.AddComponent <UISecondTabCreatorBase>(); GameObject cloneFTemp = UIManager.GetResGameObj(GridID.Uictrtypegrid) as GameObject; GameObject cloneSTemp = UIManager.GetResGameObj(GridID.Uigrowupsecondtypegrid) as GameObject; m_SecondTabCreator.Initialize <UIGrowUpSecondTypeGrid>(cloneFTemp, cloneSTemp /*m_trans_UIGrowUpSecondTypeGrid.gameObject*/, OnUpdateGrowUpCtrTypeGrid, OnUpdateGrowUpSecondTypeGrid, OnGrowUpTypeGridUIEventDlg); } } //战力 if (m_trans_growFightPowerrightscrollview != null) { m_trans_growFightPowerrightscrollview.gameObject.SetActive(true); m_GrowUpFightPowerGridCreator = m_trans_growFightPowerrightscrollview.gameObject.GetComponent <UIGridCreatorBase>(); if (m_GrowUpFightPowerGridCreator == null) { m_GrowUpFightPowerGridCreator = m_trans_growFightPowerrightscrollview.gameObject.AddComponent <UIGridCreatorBase>(); } //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uigrowupfightpowergrid) as UnityEngine.GameObject; m_GrowUpFightPowerGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_GrowUpFightPowerGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_GrowUpFightPowerGridCreator.gridWidth = 850; m_GrowUpFightPowerGridCreator.gridHeight = 101; m_GrowUpFightPowerGridCreator.RefreshCheck(); m_GrowUpFightPowerGridCreator.Initialize <UIGrowUpFightPowerGrid>(m_sprite_UIGrowUpFightPowergrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } //活动玩法 if (m_trans_growrightscrollview != null) { m_trans_growrightscrollview.gameObject.SetActive(true); m_GrowUpGridCreator = m_trans_growrightscrollview.gameObject.GetComponent <UIGridCreatorBase>(); if (m_GrowUpGridCreator == null) { m_GrowUpGridCreator = m_trans_growrightscrollview.gameObject.AddComponent <UIGridCreatorBase>(); } //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uigrowupgrid) as UnityEngine.GameObject; m_GrowUpGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_GrowUpGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_GrowUpGridCreator.gridWidth = 850; m_GrowUpGridCreator.gridHeight = 101; m_GrowUpGridCreator.RefreshCheck(); m_GrowUpGridCreator.Initialize <UIGrowUpGrid>(m_sprite_UIGrowUpGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } m_label_btn_analysis_label.text = "马上分析"; }
void InitSuitUI() { InitSuitBtnScorll(); if (m_bInitSuit) { SetNoneGridSelect(); return; } if (null != m_trans_FashionScrollView) { m_fashionCreator = m_trans_FashionScrollView.GetComponent <UIGridCreatorBase>(); if (null == m_fashionCreator) { m_fashionCreator = m_trans_FashionScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } GameObject obj = UIManager.GetResGameObj(GridID.Uifashiongrid); m_fashionCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_fashionCreator.gridContentOffset = new Vector2(-148, -161f); m_fashionCreator.gridWidth = 150; m_fashionCreator.gridHeight = 182; m_fashionCreator.rowcolumLimit = 3; m_fashionCreator.RefreshCheck(); m_fashionCreator.Initialize <UIFashionGrid>(obj, OnUpdateGridData, OnGridUIEventDlg); //m_fashionCreator.Init(); CreateFashionGridUI(); m_bInitSuit = true; } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_ctor_dayRoot = fastComponent.FastGetComponent <UIGridCreatorBase>("dayRoot"); if (null == m_ctor_dayRoot) { Engine.Utility.Log.Error("m_ctor_dayRoot 为空,请检查prefab是否缺乏组件"); } m_btn_DetailBtn = fastComponent.FastGetComponent <UIButton>("DetailBtn"); if (null == m_btn_DetailBtn) { Engine.Utility.Log.Error("m_btn_DetailBtn 为空,请检查prefab是否缺乏组件"); } m_btn_Colsebtn = fastComponent.FastGetComponent <UIButton>("Colsebtn"); if (null == m_btn_Colsebtn) { Engine.Utility.Log.Error("m_btn_Colsebtn 为空,请检查prefab是否缺乏组件"); } m_trans_UIOpenServerGrid = fastComponent.FastGetComponent <Transform>("UIOpenServerGrid"); if (null == m_trans_UIOpenServerGrid) { Engine.Utility.Log.Error("m_trans_UIOpenServerGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
void InitWidget() { if (m_trans_TeamListScrollView != null) { m_existedTeamGridCreator = m_trans_TeamListScrollView.GetComponent <UIGridCreatorBase>(); if (null == m_existedTeamGridCreator) { m_existedTeamGridCreator = m_trans_TeamListScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uiexistedteamgrid) as GameObject; m_existedTeamGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_existedTeamGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_existedTeamGridCreator.gridWidth = 780; m_existedTeamGridCreator.gridHeight = 100; m_existedTeamGridCreator.RefreshCheck(); m_existedTeamGridCreator.Initialize <UIExistedTeamGrid>(m_sprite_UIExistedTeamGrid.gameObject, OnTeamGridDataUpdate, OnTeamGridUIEvent); } if (m_scrollview_TargetScrollView != null) { m_secondsTabCreator = m_scrollview_TargetScrollView.gameObject.GetComponent <UISecondTabCreatorBase>(); if (m_secondsTabCreator == null) { m_secondsTabCreator = m_scrollview_TargetScrollView.gameObject.AddComponent <UISecondTabCreatorBase>(); //UnityEngine.GameObject fObj = UIManager.GetResGameObj(GridID.Uititlectrtypegrid) as GameObject; UnityEngine.GameObject fObj = UIManager.GetResGameObj(GridID.Uictrtypegrid) as GameObject; UnityEngine.GameObject sObj = UIManager.GetResGameObj(GridID.Uiteamactivitychildgrid) as GameObject; m_secondsTabCreator.Initialize <UITeamActivityChildGrid>(fObj, sObj, OnUpdateCtrTypeGrid, OnUpdateSecondGrid, OnGridUIEventDlg); } } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_label_BiaoTi_Label = fastComponent.FastGetComponent <UILabel>("BiaoTi_Label"); if (null == m_label_BiaoTi_Label) { Engine.Utility.Log.Error("m_label_BiaoTi_Label 为空,请检查prefab是否缺乏组件"); } m_label_text = fastComponent.FastGetComponent <UILabel>("text"); if (null == m_label_text) { Engine.Utility.Log.Error("m_label_text 为空,请检查prefab是否缺乏组件"); } m_label_title = fastComponent.FastGetComponent <UILabel>("title"); if (null == m_label_title) { Engine.Utility.Log.Error("m_label_title 为空,请检查prefab是否缺乏组件"); } m_label_description = fastComponent.FastGetComponent <UILabel>("description"); if (null == m_label_description) { Engine.Utility.Log.Error("m_label_description 为空,请检查prefab是否缺乏组件"); } m_btn_close = fastComponent.FastGetComponent <UIButton>("close"); if (null == m_btn_close) { Engine.Utility.Log.Error("m_btn_close 为空,请检查prefab是否缺乏组件"); } m_ctor_itemRoot = fastComponent.FastGetComponent <UIGridCreatorBase>("itemRoot"); if (null == m_ctor_itemRoot) { Engine.Utility.Log.Error("m_ctor_itemRoot 为空,请检查prefab是否缺乏组件"); } m_btn_lingquBtn = fastComponent.FastGetComponent <UIButton>("lingquBtn"); if (null == m_btn_lingquBtn) { Engine.Utility.Log.Error("m_btn_lingquBtn 为空,请检查prefab是否缺乏组件"); } m_label_Label = fastComponent.FastGetComponent <UILabel>("Label"); if (null == m_label_Label) { Engine.Utility.Log.Error("m_label_Label 为空,请检查prefab是否缺乏组件"); } m_sprite_Status_Received = fastComponent.FastGetComponent <UISprite>("Status_Received"); if (null == m_sprite_Status_Received) { Engine.Utility.Log.Error("m_sprite_Status_Received 为空,请检查prefab是否缺乏组件"); } m_trans_UIItemRewardGrid = fastComponent.FastGetComponent <Transform>("UIItemRewardGrid"); if (null == m_trans_UIItemRewardGrid) { Engine.Utility.Log.Error("m_trans_UIItemRewardGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_ctor_RedEnvelopeScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("RedEnvelopeScrollView"); if (null == m_ctor_RedEnvelopeScrollView) { Engine.Utility.Log.Error("m_ctor_RedEnvelopeScrollView 为空,请检查prefab是否缺乏组件"); } m_trans_nohave = fastComponent.FastGetComponent <Transform>("nohave"); if (null == m_trans_nohave) { Engine.Utility.Log.Error("m_trans_nohave 为空,请检查prefab是否缺乏组件"); } m_btn_btn_history = fastComponent.FastGetComponent <UIButton>("btn_history"); if (null == m_btn_btn_history) { Engine.Utility.Log.Error("m_btn_btn_history 为空,请检查prefab是否缺乏组件"); } m_btn_btn_fresh = fastComponent.FastGetComponent <UIButton>("btn_fresh"); if (null == m_btn_btn_fresh) { Engine.Utility.Log.Error("m_btn_btn_fresh 为空,请检查prefab是否缺乏组件"); } m_btn_btn_Send = fastComponent.FastGetComponent <UIButton>("btn_Send"); if (null == m_btn_btn_Send) { Engine.Utility.Log.Error("m_btn_btn_Send 为空,请检查prefab是否缺乏组件"); } m_trans_uiRedEnvelopeGrid = fastComponent.FastGetComponent <Transform>("uiRedEnvelopeGrid"); if (null == m_trans_uiRedEnvelopeGrid) { Engine.Utility.Log.Error("m_trans_uiRedEnvelopeGrid 为空,请检查prefab是否缺乏组件"); } m_label_name_label = fastComponent.FastGetComponent <UILabel>("name_label"); if (null == m_label_name_label) { Engine.Utility.Log.Error("m_label_name_label 为空,请检查prefab是否缺乏组件"); } m_label_des_label = fastComponent.FastGetComponent <UILabel>("des_label"); if (null == m_label_des_label) { Engine.Utility.Log.Error("m_label_des_label 为空,请检查prefab是否缺乏组件"); } m_label_title_label = fastComponent.FastGetComponent <UILabel>("title_label"); if (null == m_label_title_label) { Engine.Utility.Log.Error("m_label_title_label 为空,请检查prefab是否缺乏组件"); } m_label_text_label = fastComponent.FastGetComponent <UILabel>("text_label"); if (null == m_label_text_label) { Engine.Utility.Log.Error("m_label_text_label 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
protected override void OnPanelBaseDestory() { base.OnPanelBaseDestory(); if (null != m_petSettingGridCreator) { UIManager.OnObjsRelease(m_petSettingGridCreator.CacheTransform, (uint)GridID.Uipetsettinggrid); m_petSettingGridCreator = null; } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_label_name = fastComponent.FastGetComponent <UILabel>("name"); if (null == m_label_name) { Engine.Utility.Log.Error("m_label_name 为空,请检查prefab是否缺乏组件"); } m_btn_close = fastComponent.FastGetComponent <UIButton>("close"); if (null == m_btn_close) { Engine.Utility.Log.Error("m_btn_close 为空,请检查prefab是否缺乏组件"); } m_ctor_ScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("ScrollView"); if (null == m_ctor_ScrollView) { Engine.Utility.Log.Error("m_ctor_ScrollView 为空,请检查prefab是否缺乏组件"); } m_ctor_Right = fastComponent.FastGetComponent <UIGridCreatorBase>("Right"); if (null == m_ctor_Right) { Engine.Utility.Log.Error("m_ctor_Right 为空,请检查prefab是否缺乏组件"); } m_trans_DeliverGrid = fastComponent.FastGetComponent <Transform>("DeliverGrid"); if (null == m_trans_DeliverGrid) { Engine.Utility.Log.Error("m_trans_DeliverGrid 为空,请检查prefab是否缺乏组件"); } m_sprite_Icon = fastComponent.FastGetComponent <UISprite>("Icon"); if (null == m_sprite_Icon) { Engine.Utility.Log.Error("m_sprite_Icon 为空,请检查prefab是否缺乏组件"); } m_label_Cost_label = fastComponent.FastGetComponent <UILabel>("Cost_label"); if (null == m_label_Cost_label) { Engine.Utility.Log.Error("m_label_Cost_label 为空,请检查prefab是否缺乏组件"); } m_sprite_Chose = fastComponent.FastGetComponent <UISprite>("Chose"); if (null == m_sprite_Chose) { Engine.Utility.Log.Error("m_sprite_Chose 为空,请检查prefab是否缺乏组件"); } m_trans_TabGrid = fastComponent.FastGetComponent <Transform>("TabGrid"); if (null == m_trans_TabGrid) { Engine.Utility.Log.Error("m_trans_TabGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
void InitWidget() { //每日 m_dailyCreator = m_trans_DailyRoot.GetComponent <UIGridCreatorBase>(); if (m_dailyCreator == null) { m_dailyCreator = m_trans_DailyRoot.gameObject.AddComponent <UIGridCreatorBase>(); } if (m_dailyCreator != null) { m_dailyCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_dailyCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_dailyCreator.gridWidth = 155; m_dailyCreator.gridHeight = 50; m_dailyCreator.RefreshCheck(); m_dailyCreator.Initialize <UIAccumulativeDailyGrid>(m_trans_UIAccumulativeDailyGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } //每日item m_dailyItemCreator = m_trans_ItemListRoot.GetComponent <UIGridCreatorBase>(); if (m_dailyItemCreator == null) { m_dailyItemCreator = m_trans_ItemListRoot.gameObject.AddComponent <UIGridCreatorBase>(); } if (m_dailyItemCreator != null) { m_dailyItemCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_dailyItemCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_dailyItemCreator.gridWidth = 100; m_dailyItemCreator.gridHeight = 100; m_dailyItemCreator.RefreshCheck(); m_dailyItemCreator.Initialize <UIItemRewardGrid>(m_trans_UIItemRewardGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } //每周 m_weekCreator = m_trans_WeekRoot.GetComponent <UIGridCreatorBase>(); if (m_weekCreator == null) { m_weekCreator = m_trans_WeekRoot.gameObject.AddComponent <UIGridCreatorBase>(); } if (m_weekCreator != null) { m_weekCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_weekCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_weekCreator.gridWidth = 300; m_weekCreator.gridHeight = 125; m_weekCreator.RefreshCheck(); m_weekCreator.Initialize <UIAccumulativeWeekGrid>(m_widget_UIAccumulativeWeekGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_ctor_ItemGridScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("ItemGridScrollView"); if (null == m_ctor_ItemGridScrollView) { Engine.Utility.Log.Error("m_ctor_ItemGridScrollView 为空,请检查prefab是否缺乏组件"); } m_label_EarningTime = fastComponent.FastGetComponent <UILabel>("EarningTime"); if (null == m_label_EarningTime) { Engine.Utility.Log.Error("m_label_EarningTime 为空,请检查prefab是否缺乏组件"); } m_label_EXpEarning = fastComponent.FastGetComponent <UILabel>("EXpEarning"); if (null == m_label_EXpEarning) { Engine.Utility.Log.Error("m_label_EXpEarning 为空,请检查prefab是否缺乏组件"); } m_btn_Get = fastComponent.FastGetComponent <UIButton>("Get"); if (null == m_btn_Get) { Engine.Utility.Log.Error("m_btn_Get 为空,请检查prefab是否缺乏组件"); } m_btn_Jump = fastComponent.FastGetComponent <UIButton>("Jump"); if (null == m_btn_Jump) { Engine.Utility.Log.Error("m_btn_Jump 为空,请检查prefab是否缺乏组件"); } m_btn_OneCheck = fastComponent.FastGetComponent <UIButton>("OneCheck"); if (null == m_btn_OneCheck) { Engine.Utility.Log.Error("m_btn_OneCheck 为空,请检查prefab是否缺乏组件"); } m_btn_TwoCheck = fastComponent.FastGetComponent <UIButton>("TwoCheck"); if (null == m_btn_TwoCheck) { Engine.Utility.Log.Error("m_btn_TwoCheck 为空,请检查prefab是否缺乏组件"); } m_trans_UIOfflineRewardGrid = fastComponent.FastGetComponent <Transform>("UIOfflineRewardGrid"); if (null == m_trans_UIOfflineRewardGrid) { Engine.Utility.Log.Error("m_trans_UIOfflineRewardGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_trans_Content = fastComponent.FastGetComponent <Transform>("Content"); if (null == m_trans_Content) { Engine.Utility.Log.Error("m_trans_Content 为空,请检查prefab是否缺乏组件"); } m_btn_close = fastComponent.FastGetComponent <UIButton>("close"); if (null == m_btn_close) { Engine.Utility.Log.Error("m_btn_close 为空,请检查prefab是否缺乏组件"); } m_label_name = fastComponent.FastGetComponent <UILabel>("name"); if (null == m_label_name) { Engine.Utility.Log.Error("m_label_name 为空,请检查prefab是否缺乏组件"); } m_trans_ToggleContent = fastComponent.FastGetComponent <Transform>("ToggleContent"); if (null == m_trans_ToggleContent) { Engine.Utility.Log.Error("m_trans_ToggleContent 为空,请检查prefab是否缺乏组件"); } m_ctor_SearchScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("SearchScrollView"); if (null == m_ctor_SearchScrollView) { Engine.Utility.Log.Error("m_ctor_SearchScrollView 为空,请检查prefab是否缺乏组件"); } m_input_Input = fastComponent.FastGetComponent <UIInput>("Input"); if (null == m_input_Input) { Engine.Utility.Log.Error("m_input_Input 为空,请检查prefab是否缺乏组件"); } m_btn_BtnSearch = fastComponent.FastGetComponent <UIButton>("BtnSearch"); if (null == m_btn_BtnSearch) { Engine.Utility.Log.Error("m_btn_BtnSearch 为空,请检查prefab是否缺乏组件"); } m_ctor_HistoryScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("HistoryScrollView"); if (null == m_ctor_HistoryScrollView) { Engine.Utility.Log.Error("m_ctor_HistoryScrollView 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
void InitSkillGrids() { m_skillCreatorBase = m_trans_SkillScrollview.GetComponent <UIGridCreatorBase>(); if (m_skillCreatorBase == null) { m_skillCreatorBase = m_trans_SkillScrollview.gameObject.AddComponent <UIGridCreatorBase>(); } m_skillCreatorBase.gridContentOffset = new UnityEngine.Vector2(-185, -10); m_skillCreatorBase.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_skillCreatorBase.gridWidth = 373; m_skillCreatorBase.gridHeight = 143; m_skillCreatorBase.rowcolumLimit = 2; m_skillCreatorBase.RefreshCheck(); m_skillCreatorBase.Initialize <UIRideSkillGrid>(m_trans_UIRideSkillGrid.gameObject, OnRideSkillGridDataUpdate, OnRideSkillGridUIEvent); }
void OnCreateRideGrid() { m_UIGridCreatorBase = m_trans_Ridescrollview.GetComponent <UIGridCreatorBase>(); if (m_UIGridCreatorBase == null) { m_UIGridCreatorBase = m_trans_Ridescrollview.gameObject.AddComponent <UIGridCreatorBase>(); } m_UIGridCreatorBase.gridContentOffset = new UnityEngine.Vector2(0, 0); m_UIGridCreatorBase.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_UIGridCreatorBase.gridWidth = 295; m_UIGridCreatorBase.gridHeight = 105; m_UIGridCreatorBase.rowcolumLimit = 1; m_UIGridCreatorBase.RefreshCheck(); m_UIGridCreatorBase.Initialize <UIRideGrid>(m_sprite_UIRideGrid.gameObject, OnRidtGridDataUpdate, OnRideGridUIEvent); }
void InitWidget() { if (m_trans_taskRewardRoot != null) { m_rewardItemGridCreator = m_trans_taskRewardRoot.gameObject.GetComponent <UIGridCreatorBase>(); if (m_rewardItemGridCreator == null) { m_rewardItemGridCreator = m_trans_taskRewardRoot.gameObject.AddComponent <UIGridCreatorBase>(); } //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uiitemshow) as UnityEngine.GameObject; m_rewardItemGridCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_rewardItemGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_rewardItemGridCreator.gridWidth = 90; m_rewardItemGridCreator.gridHeight = 120; m_rewardItemGridCreator.RefreshCheck(); m_rewardItemGridCreator.Initialize <UIItemShow>((uint)GridID.Uiitemshow, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnGridDataUpdate, OnGridUIEvent); } //已接任务 if (m_scrollview_alreadyDoMission != null) { m_secondsTabAlreadyDoMissionCreator = m_scrollview_alreadyDoMission.gameObject.GetComponent <UISecondTabCreatorBase>(); if (m_secondsTabAlreadyDoMissionCreator == null) { m_secondsTabAlreadyDoMissionCreator = m_scrollview_alreadyDoMission.gameObject.AddComponent <UISecondTabCreatorBase>(); GameObject cloneFTemp = UIManager.GetResGameObj(GridID.Uictrtypegrid) as GameObject; GameObject cloneSTemp = UIManager.GetResGameObj(GridID.Uisecondtypegrid) as GameObject; m_secondsTabAlreadyDoMissionCreator.Initialize <UISecondTypeGrid>(cloneFTemp, cloneSTemp, OnUpdateMissionCtrTypeGrid, OnUpdateMissionSecondGrid, OnMissionCtrTypeGridUIEventDlg); } } //可接任务 if (m_scrollview_canDoMission != null) { m_secondsTabCanDoMissionCreator = m_scrollview_canDoMission.gameObject.GetComponent <UISecondTabCreatorBase>(); if (m_secondsTabCanDoMissionCreator == null) { m_secondsTabCanDoMissionCreator = m_scrollview_canDoMission.gameObject.AddComponent <UISecondTabCreatorBase>(); GameObject cloneFTemp = UIManager.GetResGameObj(GridID.Uictrtypegrid) as GameObject; GameObject cloneSTemp = UIManager.GetResGameObj(GridID.Uisecondtypegrid) as GameObject; m_secondsTabCanDoMissionCreator.Initialize <UISecondTypeGrid>(cloneFTemp, cloneSTemp, OnUpdateMissionCtrTypeGrid, OnUpdateMissionSecondGrid, OnMissionCtrTypeGridUIEventDlg); } } }
void AddCreator(Transform parent) { if (parent != null) { m_ctor_UIItemRewardCreator = parent.GetComponent <UIGridCreatorBase>(); if (m_ctor_UIItemRewardCreator == null) { m_ctor_UIItemRewardCreator = parent.gameObject.AddComponent <UIGridCreatorBase>(); } m_ctor_UIItemRewardCreator.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_ctor_UIItemRewardCreator.gridWidth = 90; m_ctor_UIItemRewardCreator.gridHeight = 90; m_ctor_UIItemRewardCreator.RefreshCheck(); m_ctor_UIItemRewardCreator.Initialize <UIItemRewardGrid>(m_trans_UIItemRewardGrid.gameObject, OnUpdateGridData, null); } }
void OnCreateGrid() { UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uicommonuseitemgrid) as UnityEngine.GameObject; m_UIGridCreatorBase = m_trans_ItemScrollView.GetComponent <UIGridCreatorBase>(); if (m_UIGridCreatorBase == null) { m_UIGridCreatorBase = m_trans_ItemScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } m_UIGridCreatorBase.gridContentOffset = new UnityEngine.Vector2(0, 0); m_UIGridCreatorBase.arrageMent = UIGridCreatorBase.Arrangement.Horizontal; m_UIGridCreatorBase.gridWidth = 403; m_UIGridCreatorBase.gridHeight = 105; m_UIGridCreatorBase.rowcolumLimit = 1; m_UIGridCreatorBase.RefreshCheck(); m_UIGridCreatorBase.Initialize <UICommonUseItemGrid>(obj, OnItemGridDataUpdate, OnItemGridUIEvent); }
void InitWidget() { //main目标 if (m_trans_left_Panel != null) { m_TeamMainTargetCreator = m_trans_left_Panel.GetComponent <UIGridCreatorBase>(); if (m_TeamMainTargetCreator == null) { m_TeamMainTargetCreator = m_trans_left_Panel.gameObject.AddComponent <UIGridCreatorBase>(); } if (m_TeamMainTargetCreator != null) { //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uiteammaintargetgrid) as UnityEngine.GameObject; m_TeamMainTargetCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_TeamMainTargetCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_TeamMainTargetCreator.gridWidth = 200; m_TeamMainTargetCreator.gridHeight = 62; m_TeamMainTargetCreator.RefreshCheck(); m_TeamMainTargetCreator.Initialize <UITeamMainTargetGrid>(m_trans_UITeamMainTargetGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } } //index目标 if (m_trans_right_Panel != null) { m_TeamIndexTargetCreator = m_trans_right_Panel.GetComponent <UIGridCreatorBase>(); if (m_TeamIndexTargetCreator == null) { m_TeamIndexTargetCreator = m_trans_right_Panel.gameObject.AddComponent <UIGridCreatorBase>(); } if (m_TeamIndexTargetCreator != null) { //UnityEngine.GameObject obj = UIManager.GetResGameObj(GridID.Uiteamindextargetgrid) as UnityEngine.GameObject; m_TeamIndexTargetCreator.gridContentOffset = new UnityEngine.Vector2(0, 0); m_TeamIndexTargetCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_TeamIndexTargetCreator.gridWidth = 460; m_TeamIndexTargetCreator.gridHeight = 70; m_TeamIndexTargetCreator.RefreshCheck(); m_TeamIndexTargetCreator.Initialize <UITeamIndexTargetGrid>(m_trans_UITeamIndexTargetGrid.gameObject, OnGridDataUpdate, OnGridUIEvent); } } }
/// <summary> /// 邀请界面 氏族和组队用的预制不一样 只能在这个地方通过类型来加载不同的预制 /// </summary> /// <param name="type"></param> private void InitWidgets(bool type) { if (!type) { if (null == m_inviteCreator) { if (null != m_trans_ScrollView) { m_inviteCreator = m_trans_ScrollView.GetComponent <UIGridCreatorBase>(); if (null == m_inviteCreator) { m_inviteCreator = m_trans_ScrollView.gameObject.AddComponent <UIGridCreatorBase>(); GameObject obj = UIManager.GetResGameObj(GridID.Uiteaminvitegrid) as GameObject; m_inviteCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_inviteCreator.gridContentOffset = new Vector2(0, 78); m_inviteCreator.gridWidth = 410; m_inviteCreator.gridHeight = 108; m_inviteCreator.RefreshCheck(); m_inviteCreator.Initialize <UIInviteGrid>(obj, OnUpdateUIGrid, OnUIGridEventDlg); } } } } else { //氏族格子用特殊的预制 if (null == m_clanInviteCreator) { if (null != m_trans_ScrollView) { m_clanInviteCreator = m_trans_ScrollView.GetComponent <UIGridCreatorBase>(); if (null == m_clanInviteCreator) { m_clanInviteCreator = m_trans_ScrollView.gameObject.AddComponent <UIGridCreatorBase>(); GameObject obj = UIManager.GetResGameObj(GridID.Uiinviteclangrid) as GameObject; m_clanInviteCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_clanInviteCreator.gridContentOffset = new Vector2(0, 78); m_clanInviteCreator.gridWidth = 410; m_clanInviteCreator.gridHeight = 108; m_clanInviteCreator.RefreshCheck(); m_clanInviteCreator.Initialize <UIInviteGrid>(obj, OnUpdateUIGrid, OnUIGridEventDlg); } } } } }
/// <summary> /// 初始化组件 /// </summary> void InitWidget() { m_rewardGridCreator = m_trans_listScrollView.gameObject.GetComponent <UIGridCreatorBase>(); if (m_rewardGridCreator == null) { m_rewardGridCreator = m_trans_listScrollView.gameObject.AddComponent <UIGridCreatorBase>(); } // GameObject obj = UIManager.GetResGameObj(GridID.Uiarenarewardgrid) as GameObject; m_rewardGridCreator.gridContentOffset = new Vector2(0, 0); m_rewardGridCreator.arrageMent = UIGridCreatorBase.Arrangement.Vertical; m_rewardGridCreator.gridWidth = 740; m_rewardGridCreator.gridHeight = 61; m_rewardGridCreator.RefreshCheck(); m_rewardGridCreator.Initialize <UIArenaRewardGrid>(m_trans_UIArenaRewardGrid.gameObject, OnGridUpdateData, null); }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_label_myRanknum_label = fastComponent.FastGetComponent <UILabel>("myRanknum_label"); if (null == m_label_myRanknum_label) { Engine.Utility.Log.Error("m_label_myRanknum_label 为空,请检查prefab是否缺乏组件"); } m_label_myScorenum_label = fastComponent.FastGetComponent <UILabel>("myScorenum_label"); if (null == m_label_myScorenum_label) { Engine.Utility.Log.Error("m_label_myScorenum_label 为空,请检查prefab是否缺乏组件"); } m_ctor_BossDamRankSV = fastComponent.FastGetComponent <UIGridCreatorBase>("BossDamRankSV"); if (null == m_ctor_BossDamRankSV) { Engine.Utility.Log.Error("m_ctor_BossDamRankSV 为空,请检查prefab是否缺乏组件"); } m_btn_btn_close = fastComponent.FastGetComponent <UIButton>("btn_close"); if (null == m_btn_btn_close) { Engine.Utility.Log.Error("m_btn_btn_close 为空,请检查prefab是否缺乏组件"); } m_widget_UIJvBaoBossDamRankGrid = fastComponent.FastGetComponent <UIWidget>("UIJvBaoBossDamRankGrid"); if (null == m_widget_UIJvBaoBossDamRankGrid) { Engine.Utility.Log.Error("m_widget_UIJvBaoBossDamRankGrid 为空,请检查prefab是否缺乏组件"); } m_btn_BtnConfirmQuit = fastComponent.FastGetComponent <UIButton>("BtnConfirmQuit"); if (null == m_btn_BtnConfirmQuit) { Engine.Utility.Log.Error("m_btn_BtnConfirmQuit 为空,请检查prefab是否缺乏组件"); } m_label_ConfirmQuitTxt = fastComponent.FastGetComponent <UILabel>("ConfirmQuitTxt"); if (null == m_label_ConfirmQuitTxt) { Engine.Utility.Log.Error("m_label_ConfirmQuitTxt 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_trans_Content = fastComponent.FastGetComponent <Transform>("Content"); if (null == m_trans_Content) { Engine.Utility.Log.Error("m_trans_Content 为空,请检查prefab是否缺乏组件"); } m_btn_btn_unclose = fastComponent.FastGetComponent <UIButton>("btn_unclose"); if (null == m_btn_btn_unclose) { Engine.Utility.Log.Error("m_btn_btn_unclose 为空,请检查prefab是否缺乏组件"); } m_ctor_GetWayScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("GetWayScrollView"); if (null == m_ctor_GetWayScrollView) { Engine.Utility.Log.Error("m_ctor_GetWayScrollView 为空,请检查prefab是否缺乏组件"); } m_ctor_GetWayRoot = fastComponent.FastGetComponent <UIGridCreatorBase>("GetWayRoot"); if (null == m_ctor_GetWayRoot) { Engine.Utility.Log.Error("m_ctor_GetWayRoot 为空,请检查prefab是否缺乏组件"); } m_btn_btn_close = fastComponent.FastGetComponent <UIButton>("btn_close"); if (null == m_btn_btn_close) { Engine.Utility.Log.Error("m_btn_btn_close 为空,请检查prefab是否缺乏组件"); } m_label_DesLabel = fastComponent.FastGetComponent <UILabel>("DesLabel"); if (null == m_label_DesLabel) { Engine.Utility.Log.Error("m_label_DesLabel 为空,请检查prefab是否缺乏组件"); } m_trans_UIGetWayGrid = fastComponent.FastGetComponent <Transform>("UIGetWayGrid"); if (null == m_trans_UIGetWayGrid) { Engine.Utility.Log.Error("m_trans_UIGetWayGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_btn_FunctionPushContent = fastComponent.FastGetComponent <UIButton>("FunctionPushContent"); if (null == m_btn_FunctionPushContent) { Engine.Utility.Log.Error("m_btn_FunctionPushContent 为空,请检查prefab是否缺乏组件"); } m_trans_Type1 = fastComponent.FastGetComponent <Transform>("Type1"); if (null == m_trans_Type1) { Engine.Utility.Log.Error("m_trans_Type1 为空,请检查prefab是否缺乏组件"); } m_trans_Type2 = fastComponent.FastGetComponent <Transform>("Type2"); if (null == m_trans_Type2) { Engine.Utility.Log.Error("m_trans_Type2 为空,请检查prefab是否缺乏组件"); } m_trans_MessagePushContent = fastComponent.FastGetComponent <Transform>("MessagePushContent"); if (null == m_trans_MessagePushContent) { Engine.Utility.Log.Error("m_trans_MessagePushContent 为空,请检查prefab是否缺乏组件"); } m_trans_BtnRoot = fastComponent.FastGetComponent <Transform>("BtnRoot"); if (null == m_trans_BtnRoot) { Engine.Utility.Log.Error("m_trans_BtnRoot 为空,请检查prefab是否缺乏组件"); } m_ctor_DailyPushContent = fastComponent.FastGetComponent <UIGridCreatorBase>("DailyPushContent"); if (null == m_ctor_DailyPushContent) { Engine.Utility.Log.Error("m_ctor_DailyPushContent 为空,请检查prefab是否缺乏组件"); } m_trans_UIDailyPushGrid = fastComponent.FastGetComponent <Transform>("UIDailyPushGrid"); if (null == m_trans_UIDailyPushGrid) { Engine.Utility.Log.Error("m_trans_UIDailyPushGrid 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }
//初始化控件变量 protected override void InitControls() { fastComponent = GetComponent <FastComponent>(); fastComponent.BuildFastComponents(); m_trans_Content = fastComponent.FastGetComponent <Transform>("Content"); if (null == m_trans_Content) { Engine.Utility.Log.Error("m_trans_Content 为空,请检查prefab是否缺乏组件"); } m_sprite_Box = fastComponent.FastGetComponent <UISprite>("Box"); if (null == m_sprite_Box) { Engine.Utility.Log.Error("m_sprite_Box 为空,请检查prefab是否缺乏组件"); } m_label_StrengthenTxt = fastComponent.FastGetComponent <UILabel>("StrengthenTxt"); if (null == m_label_StrengthenTxt) { Engine.Utility.Log.Error("m_label_StrengthenTxt 为空,请检查prefab是否缺乏组件"); } m_trans_Offset = fastComponent.FastGetComponent <Transform>("Offset"); if (null == m_trans_Offset) { Engine.Utility.Log.Error("m_trans_Offset 为空,请检查prefab是否缺乏组件"); } m_ctor_ScrollView = fastComponent.FastGetComponent <UIGridCreatorBase>("ScrollView"); if (null == m_ctor_ScrollView) { Engine.Utility.Log.Error("m_ctor_ScrollView 为空,请检查prefab是否缺乏组件"); } m_scrollview_ColorScroll = fastComponent.FastGetComponent <UIScrollView>("ColorScroll"); if (null == m_scrollview_ColorScroll) { Engine.Utility.Log.Error("m_scrollview_ColorScroll 为空,请检查prefab是否缺乏组件"); } m_label_TextLabel = fastComponent.FastGetComponent <UILabel>("TextLabel"); if (null == m_label_TextLabel) { Engine.Utility.Log.Error("m_label_TextLabel 为空,请检查prefab是否缺乏组件"); } if (null != fastComponent) { GameObject.Destroy(fastComponent); } }