Ejemplo n.º 1
0
        protected override void OnInit(object userData)
        {
            base.OnInit(userData);
            GUIEventListener.Get(gameObject).onClick = _ => {
                OnClose(true, userData);
            };

            //GetComponent<Button>().onClick.AddListener(()=> {
            //    this.OnClose(false, userData);
            //});
        }
Ejemplo n.º 2
0
        public void OpenInitChooseHeroForm()
        {
            CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_heroInitChooseFormPath, false, true);

            if (script != null)
            {
                this.heroDescTxt      = script.transform.Find("heroDescTxt").GetComponent <Text>();
                this.heroDescTxt.text = string.Empty;
                this.selectHeroBtn    = script.transform.Find("selectHeroBtn").gameObject;
                GUIEventListener.Get(this.selectHeroBtn).onClick += new GUIEventListener.VoidDelegate(this.OnConfirmChooseHero);
                this.selectHeroBtn.CustomSetActive(false);
                this.InitHeroPanel();
            }
        }