Пример #1
0
    void SunMoveFinish()
    {
        BuildScene.mInstance.sunCamera.Show_Key = false;
        ShowNotice();

        m_bCanClick = true;

        GuideManager guideMgr = Core.Data.guideManger;
        TemporyData  temp     = Core.Data.temper;

        if (guideMgr.isGuiding && Core.Data.guideManger.SpecialGuideID > 0)
        {
            guideMgr.Init();
        }

        temp.currentBattleType = TemporyData.BattleType.None;

        ///
        /// --------  走马灯  -----------
        ///如果是新手引导的时候,则跳过这次网络请求,我们会在新手引导结束的时候添加网络请求
        if (!guideMgr.isGuiding)
        {
            //只有第一次进入“GameUI”场景的时候
            if (Core.SM.LastScenesName == SceneName.LOGIN_SCENE)
            {
                Core.Data.MainNoticeMgr.loadFromNetwork(() => {
                    _noticeUI = MainNoticeUI.getInstance(_bottomRoot);
                });
            }
            else
            {
                /// -------- 每五分钟会同步一次数据 -----------
                ///
                _noticeUI = MainNoticeUI.getInstance(_bottomRoot);
                if (!Core.Data.temper.getNoticeReady)
                {
                    Core.Data.MainNoticeMgr.loadFromNetwork(null);
                }
            }
        }

        ///
        ///  新手引导完成的时候,能调用这个。
        ///
        guideMgr.OnGuideFinished = () => {
            _noticeUI = MainNoticeUI.getInstance(_bottomRoot);
            if (!Core.Data.temper.getNoticeReady)
            {
                Core.Data.MainNoticeMgr.loadFromNetwork(null);
            }
        };
    }
Пример #2
0
 /// <summary>
 /// 生成一个新的消息
 /// </summary>
 /// <returns>The instance.</returns>
 public static MainNoticeUI getInstance(GameObject root)
 {
     if (root == null)
     {
         return(null);
     }
     if (_ui == null)
     {
         Object     obj         = PrefabLoader.loadFromUnPack("Allen/BroadCastUI", false, false);
         GameObject goBraodcast = Instantiate(obj) as GameObject;
         RED.AddChild(goBraodcast, root);
         goBraodcast.transform.localPosition = new Vector3(24f, 6f, 0f);
         _ui = goBraodcast.GetComponent <MainNoticeUI> ();
         obj = null;
     }
     return(_ui);
 }
Пример #3
0
    public void HiddenFor3D_UI(bool showMiniBar = true)
    {
        if (BuildScene.mInstance != null)
        {
            BuildScene.mInstance.CheckAllBuildAnim();
            BuildScene.mInstance.SetShow(false);
            AsyncLoadScene.m_Instance.SetFBS(SceneName.GAME_BATTLE);
        }

        if (_mainViewCtl != null)
        {
//			UIBackground.SetActive(true);
//			_mainViewCtl.SetActive (false);
            try
            {
                RED.SetActive(false, _mainViewCtl.gameObject);
                RED.SetActive(true, UIBackground);
            }
            catch (Exception ex)
            {
                RED.LogWarning("error in hiddenfor3d");
            }
        }
        if (_playerViewCtl != null)
        {
//			_playerViewCtl.SetActive (false);
            RED.SetActive(false, _playerViewCtl.gameObject);
        }

        if (MainNoticeUI.getInstance(_bottomRoot) != null)
        {
            MainNoticeUI.getInstance(_bottomRoot).SetShow(false);
        }

        if (showMiniBar)
        {
            UIMiniPlayerController.Instance.SetActive(true);
            UIMiniPlayerController.Instance.freshPlayerInfoView();
        }
        else
        {
            UIMiniPlayerController.Instance.SetActive(false);
        }
    }