private void LoadEffect(string _path) { GameObject gameObject = Resources.Load <GameObject>(_path); if (gameObject == null) { ClientLogger.Error(_path + " Rank Effect Path Error."); return; } this.effectPrefabRefBuffer = NGUITools.AddChild(base.gameObject, gameObject); this.effectPrefabRefBuffer.SetActive(false); this.renderCtrl = this.effectPrefabRefBuffer.GetComponent <UIEffectSort>(); this.activeCtrl = this.effectPrefabRefBuffer.GetComponent <EffectDelayActive>(); }
public override void Init() { base.Init(); this.mgs = new object[] { MobaChatCode.Chat_Recv }; this.messageBox = this.transform.Find("BottomAnchor/Button/MsgBox"); this._task = this.transform.Find("BottomAnchor/Button/Task"); this._eachDayTask = this.transform.Find("BottomAnchor/Button/EachDayTask"); this._mail = this.transform.Find("BottomAnchor/Button/Mail"); this._heroSacrificial = this.transform.Find("BottomAnchor/Button/HeroSacrificial"); this._chat = this.transform.Find("BottomAnchor/Button/MsgBox/category"); this.hitchChat = this.messageBox.Find("ScrollView/Hitch"); this.chatContent = this.messageBox.Find("ScrollView/Hitch/content").GetComponent <UILabel>(); this.testLabel = this.transform.Find("TestLabel").GetComponent <UILabel>(); this.vipScroll = this.messageBox.Find("ScrollView").GetComponent <UIPanel>(); this.tween_ChatPosition = this.hitchChat.GetComponent <TweenPosition>(); this.originPosition = this.hitchChat.localPosition; this.atlas = this.transform.GetComponent <HomeChatContent>().atlas; this.emojiHitch = this.hitchChat.Find("EmojiManager"); this._friend = this.transform.Find("BottomAnchor/Button/Friend"); this._taskBtn = this.transform.Find("BottomAnchor/Button/Task/Task"); this._eachDayTaskBtn = this.transform.Find("BottomAnchor/Button/EachDayTask/light"); this._mailBtn = this.transform.Find("BottomAnchor/Button/Mail/light"); this._heroSacrificialBtn = this.transform.Find("BottomAnchor/Button/HeroSacrificial/light"); this._friendBtn = this.transform.Find("BottomAnchor/Button/Friend/light"); this._taskTip = this.transform.FindChild("TaskTips"); this._taskTipEffect = this._taskTip.FindChild("Fx_ui_daytask").GetComponent <EffectDelayActive>(); this._playBtn = this.transform.Find("BottomAnchor/Button/PlayBtn"); this.friendNum = this._friend.Find("Friend/Num").GetComponent <UILabel>(); this._playBtnStates = this._playBtn.GetComponent <SimpleToggle>(); this._tPos = this.transform.Find("BottomAnchor").GetComponent <TweenPosition>(); this.anchor = this.transform.Find("BottomAnchor").GetComponent <UIAnchor>(); UIEventListener.Get(this._taskBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickTask); UIEventListener.Get(this._eachDayTaskBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickEachDay); UIEventListener.Get(this._mailBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickMail); UIEventListener.Get(this._heroSacrificialBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickHeroSacrificial); UIEventListener.Get(this._chat.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickChat); UIEventListener.Get(this._playBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickPlayBtn); UIEventListener.Get(this._friendBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickFriend); }