public override void Init() { base.Init(); this.m_HeroItem = base.LoadPrefabCache("HeroItem"); this.AllButton = this.transform.Find("Anchor/AllButton"); this.Employ = this.AllButton.Find("Employ"); this.All = this.AllButton.Find("All"); this.Power = this.AllButton.Find("Power"); this.Agile = this.AllButton.Find("Agile"); this.IQ = this.AllButton.Find("IQ"); this.BG = this.transform.Find("Bottom/BG").GetComponent <UISprite>(); this.BackButton = this.transform.Find("Anchor/BackButton"); Transform root = this.transform.Find("Anchor/HeroPanel/HeroView"); this.favouredHeroView = new HeroView(root); this.Number = this.transform.Find("Bottom/BattleNum/Number").GetComponent <UILabel>(); this.PlayGame = this.transform.Find("Bottom/PlayGame"); Transform root2 = this.transform.Find("Bottom/HeroPanel/HeroView"); this.selectedHeroView = new SelectHeroView(root2); UIEventListener.Get(this.BackButton.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickBackBtnEvent); UIEventListener.Get(this.All.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTypeHero); UIEventListener.Get(this.Power.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTypeHero); UIEventListener.Get(this.Agile.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTypeHero); UIEventListener.Get(this.IQ.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTypeHero); UIEventListener.Get(this.Employ.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTypeHero); UIEventListener.Get(this.PlayGame.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickGoToGame); this.m_AlphaController = this.transform.GetComponent <TweenAlpha>(); }
public override void Destroy() { this.selectIndex = 0; this.favouredHeroView.Clear(); this.selectedHeroView.Clear(); this.AllButton = null; this.All = null; this.Power = null; this.Agile = null; this.IQ = null; this.Employ = null; this.BG = null; this.PlayGame = null; this.BackButton = null; this.Number = null; this.favouredHeroView = null; this.selectedHeroView = null; this.m_HeroItem = null; base.Destroy(); }