public void Awake() { var res = ETModel.Game.Scene.GetComponent <ResourcesComponent>(); res.LoadBundle(UIType.MyRecordPanel.StringToAB()); var gameObject = res.GetAsset(UIType.MyRecordPanel.StringToAB(), UIType.MyRecordPanel); this.panelGo = (GameObject)UnityEngine.Object.Instantiate(gameObject); UI ui = ComponentFactory.Create <UI, string, GameObject>(UIType.MyRecordPanel, this.panelGo, false); Game.Scene.GetComponent <UIComponent>().Add(ui); this.ReferenceCollector = this.panelGo.GetComponent <ReferenceCollector>(); this.Root = this.ReferenceCollector.Get <GameObject>("Root"); _TEC = this.AddComponent <TweenEffectComponent>(); _TEC.Add(TweenAnimationIdType.MyRecordPanel, this.Root.transform); this.ReferenceCollector.Get <GameObject>("CloseBtn").GetComponent <Button>().onClick.AddListener(Close); this.ReferenceCollector.Get <GameObject>("mask").Get <Button>().onClick.AddListener(Close); this.MyRecordToggle = this.ReferenceCollector.Get <GameObject>("MyRecordToggle").GetComponent <Button>(); this.ChenJuToggle = this.ReferenceCollector.Get <GameObject>("ChenJuToggle").GetComponent <Button>(); this.MyRecordToggle.onClick.AddListener(() => { SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); }); this.ChenJuToggle.onClick.AddListener(() => { SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); Game.PopupComponent.ShowMessageBox(DataCenterComponent.Instance.tipInfo.ChengJuNotOpenTip); }); _Content = ReferenceCollector.Get <GameObject>("Content"); _RecordLists = new List <UIRecordItem>(); _RecordViewTipsText = ReferenceCollector.Get <GameObject>("RecordViewTipsText"); }
public void Awake() { _rf = this.GetParent <UI>().GameObject.GetComponent <ReferenceCollector>(); Root = _rf.Get <GameObject>("Root"); tweenEffectComponent = AddComponent <TweenEffectComponent>(); tweenEffectComponent.Add(TweenAnimationIdType.DDZOverPanel, Root.transform); tweenEffectComponent.Play(TweenAnimationIdType.DDZOverPanel); Title = _rf.Get <GameObject>("Title").GetComponent <Image>(); baseScoreLab = _rf.Get <GameObject>("baseScoreLab").GetComponent <Text>(); bombScoreLab = _rf.Get <GameObject>("bombScoreLab").GetComponent <Text>(); FlowerScoreLab = _rf.Get <GameObject>("FlowerScoreLab").GetComponent <Text>(); LoseLab = _rf.Get <GameObject>("LoseLab"); winLab = _rf.Get <GameObject>("winLab"); Bg = _rf.Get <GameObject>("Bg").GetComponent <Image>(); ButtonHelper.RegisterButtonEvent(_rf, "mask", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); DDZUIFactory.overPanel.Remove(); DDZConfig.GameScene.DDZReadyPlugin.Show(); DDZGameConfigComponent.Instance.Clear(); }); ButtonHelper.RegisterButtonEvent(_rf, "ChangeTableBtn", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); DDZConfig.GameScene.RequestChangeRoom(); }); ButtonHelper.RegisterButtonEvent(_rf, "ContinueBtn", () => { Game.PopupComponent.SetClickLock(); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); DDZUIFactory.overPanel.Remove(); DDZConfig.GameScene.Reset(); DDZConfig.GameScene.RequestPrepare(); DDZGameConfigComponent.Instance.Clear(); }); this.InitData(); }
public void Awake() { _RecordLists = new List <UINoticeListItem>(); var res = ETModel.Game.Scene.GetComponent <ResourcesComponent>(); res.LoadBundle(UIType.UINoticePanel.StringToAB()); var gameObject = res.GetAsset(UIType.UINoticePanel.StringToAB(), UIType.UINoticePanel); this.panelGo = (GameObject)UnityEngine.Object.Instantiate(gameObject); UI ui = ComponentFactory.Create <UI, string, GameObject>(UIType.UINoticePanel, this.panelGo, false); Game.Scene.GetComponent <UIComponent>().Add(ui); this.ReferenceCollector = this.panelGo.GetComponent <ReferenceCollector>(); this.Root = this.ReferenceCollector.Get <GameObject>("Root"); this.GZBtn = this.ReferenceCollector.Get <GameObject>("GZBtn").transform; this.FangPianBtn = this.ReferenceCollector.Get <GameObject>("EmailBtn").transform; _TEC = this.AddComponent <TweenEffectComponent>(); _TEC.Add(TweenAnimationIdType.NoticePanel, this.Root.transform); this.ReferenceCollector.Get <GameObject>("CloseButton").GetComponent <Button>().onClick.AddListener(Close); this.ReferenceCollector.Get <GameObject>("CloseBg").Get <Button>().onClick.AddListener(Close); this.Content = this.ReferenceCollector.Get <GameObject>("Content"); NoMsgTips = ReferenceCollector.Get <GameObject>("NoMsgTips"); Title01 = ReferenceCollector.Get <GameObject>("Title01"); Title02 = ReferenceCollector.Get <GameObject>("Title02"); MsgDialog = ReferenceCollector.Get <GameObject>("MsgDialog"); MsgTitleText = ReferenceCollector.Get <GameObject>("MsgTitleText").Get <Text>(); MsgTxt = ReferenceCollector.Get <GameObject>("MsgTxt").Get <Text>(); MsgTitleImage01 = ReferenceCollector.Get <GameObject>("MsgTitleImage01"); MsgTitleImage02 = ReferenceCollector.Get <GameObject>("MsgTitleImage02"); ButtonHelper.RegisterButtonEvent(this.ReferenceCollector, "MsgCloseBtn", () => { SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); MsgDialog.SetActive(false); }); ButtonHelper.RegisterButtonEvent(this.ReferenceCollector, "Closebg", () => { SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); MsgDialog.SetActive(false); }); ButtonHelper.RegisterButtonEvent(this.ReferenceCollector, "GZBtn", () => { this.GZBtn.Find("an").gameObject.SetActive(false); this.FangPianBtn.Find("an").gameObject.SetActive(true); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); GetNotice(); }); ButtonHelper.RegisterButtonEvent(this.ReferenceCollector, "EmailBtn", () => { this.GZBtn.Find("an").gameObject.SetActive(true); this.FangPianBtn.Find("an").gameObject.SetActive(false); SoundComponent.Instance.PlayClip(DataCenterComponent.Instance.soundInfo.click); GetMail(); }); }
public void Awake() { var res = ETModel.Game.Scene.GetComponent <ResourcesComponent>(); res.LoadBundle(UIType.PersonSettingPanel.StringToAB()); var gameObject = res.GetAsset(UIType.PersonSettingPanel.StringToAB(), UIType.PersonSettingPanel); this.panelGo = (GameObject)UnityEngine.Object.Instantiate(gameObject); UI ui = ComponentFactory.Create <UI, string, GameObject>(UIType.PersonSettingPanel, this.panelGo, false); Game.Scene.GetComponent <UIComponent>().Add(ui); this.ReferenceCollector = this.panelGo.GetComponent <ReferenceCollector>(); this.Root = this.ReferenceCollector.Get <GameObject>("Root"); _TEC = this.AddComponent <TweenEffectComponent>(); _TEC.Add(TweenAnimationIdType.PersonSettingPanel, this.Root.transform); this.ReferenceCollector.Get <GameObject>("CloseButton").GetComponent <Button>().onClick.AddListener(Close); this.ReferenceCollector.Get <GameObject>("mask").Get <Button>().onClick.AddListener(Close); //this.SettingToggle = this.ReferenceCollector.Get<GameObject>("SettingToggle").GetComponent<Button>(); // this.ReportTableToggle = this.ReferenceCollector.Get<GameObject>("ReportTableToggle").GetComponent<Button>(); /* * this.SettingToggle.onClick.AddListener(() => * { * this.SettingToggle.transform.Find("isOn").gameObject.SetActive(true); * * this.SettingToggle.transform.Find("isOff").gameObject.SetActive(false); * * this.ReportTableToggle.transform.Find("isOn").gameObject.SetActive(false); * * this.ReportTableToggle.transform.Find("isOff").gameObject.SetActive(true); * * this.ReferenceCollector.Get<GameObject>("SettingView").SetActive(true); * * this.ReferenceCollector.Get<GameObject>("ReportView").SetActive(false); * }); * * this.ReportTableToggle.onClick.AddListener(() => { * * this.SettingToggle.transform.Find("isOn").gameObject.SetActive(false); * * this.SettingToggle.transform.Find("isOff").gameObject.SetActive(true); * * this.ReportTableToggle.transform.Find("isOn").gameObject.SetActive(true); * * this.ReportTableToggle.transform.Find("isOff").gameObject.SetActive(false); * * this.ReferenceCollector.Get<GameObject>("SettingView").SetActive(false); * * this.ReferenceCollector.Get<GameObject>("ReportView").SetActive(true); * }); */ this.InitSettingView(); //this.InitReportView(); }