Esempio n. 1
0
        /// <summary>
        /// 打开跑马灯
        /// </summary>
        /// <param name="arg"></param>
        public void OnOpen(object arg = null)
        {
            if (arg != null)
            {
                data = null;

                data = arg as NoticeData;
                //设置公告显示位置
                this.panel.transform.localPosition = data.Pos;

                this.Add(data.mes);

                this.Process();
            }
        }
Esempio n. 2
0
        public void Start()
        {
            _rf = this.GetParent <UI>().GameObject.GetComponent <ReferenceCollector>();

            //绑定大厅插件
            this.GameLobbyBottomPlugin = AddComponent <GameLobbyBottomPlugin>().Awake(_rf.Get <GameObject>("BottomDialog"));

            this.GameLobbyCarousePlugin = AddComponent <GameLobbyCarousePlugin>().Awake(_rf.Get <GameObject>("ShareBg"));

            this.GameLobbyGameListPlugin = AddComponent <GameLobbyGameListPlugin>().Awake(_rf.Get <GameObject>("GameListsDialog"));

            this.GameLobbyGameTypeSelectPlugin = AddComponent <GameLobbyGameTypeSelectPlugin>().Awake(_rf.Get <GameObject>("GameTypeBg"));

            this.GameLobbyTopPlugin = AddComponent <GameLobbyTopPlugin>().Awake(_rf.Get <GameObject>("L_TopDialog"));

            //检测是否需要动态加载图片
            //Game.EventSystem.Run(EventIdType.AsyncImageDownload);

            //检测模块是否开启或关闭
            //Game.EventSystem.Run(EventIdType.ModuleEnable);

            //检测游戏回重
            Game.EventSystem.Run(EventIdType.CheckGameReBack);

            //初始化
            Initail();

            //播放大厅背景音乐
            var _soundVolume = PlayerPrefs.GetFloat("SoundVolume", 1);

            SoundComponent.Instance.PlayMusic(DataCenterComponent.Instance.soundInfo.bg_hall, 0, _soundVolume, true);

            //显示大厅跑马灯

            var noticData = new NoticeData();

            noticData.Pos = new Vector3(0, 60, 0);

            Game.PopupComponent.ShowNoticeUI(DataCenterComponent.Instance.MarqueeInfo.SubGameDefault, noticData);

            //大厅增加点击特效
            ClickEffectComponent.instance.Bind();
        }
Esempio n. 3
0
        /// <summary>
        /// 打开跑马灯
        /// </summary>
        /// <param name="message"></param>
        public void ShowNoticeUI(string message = "", NoticeData data = null)
        {
            GameObject gameObject = LoadUIAsset(UIType.UIScrollNoticePanel);

            UI ui = ComponentFactory.Create <UI, string, GameObject>(UIType.UIScrollNoticePanel, gameObject, false);

            var pmd = ui.AddComponent <ScrollNoticeComponent>();

            Game.Scene.GetComponent <UIComponent>().Add(ui);

            if (data == null)
            {
                data = new NoticeData();
            }

            data.mes = message;

            pmd.OnOpen(data);
        }