コード例 #1
0
 public override void OnShow(object param)
 {
     base.OnShow(param);
     m_loadingTexture.TextureName = $"image_loading_{ Random.Range(1, 6)}.png";
     tipKeys = new string[MAXTIPS];
     for (int i = 0; i < MAXTIPS; i++)
     {
         if (i < 9)
         {
             tipKeys[i] = string.Format("tips_00{0}", (i + 1));
         }
         else
         {
             tipKeys[i] = string.Format("tips_0{0}", (i + 1));
         }
     }
     if (param != null)
     {
         LoadingData loadingData = (LoadingData)param;
         Reset(loadingData);
         if (loadingData.isBigWorld)
         {
             GameEvents.UIEvents.UI_Loading_Event.OnStartLoading.SafeInvoke();
         }
     }
     this.m_tipLab.Text = GetRandomTip();
     this.width         = this.m_Slider.Widget.sizeDelta.x;
 }
コード例 #2
0
 private void Reset(LoadingData loadingData)
 {
     this.m_Slider.Value = 0f;
     this.m_Effect.Widget.anchoredPosition = Vector2.zero;;
     this.m_Effect.EffectPrefabName        = "UI_jindutiao.prefab";
     this.m_Effect.Visible = true;
 }
コード例 #3
0
        public void LoadProgress(float[] time, float[] progress, bool[] state, bool isBigworld)
        {
            LoadingData loadData = new LoadingData(time, progress, state, isBigworld);

            FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_Loading);
            param.Param    = loadData;
            m_loadingFrame = EngineCoreEvents.UIEvent.ShowUIAndGetFrameWithParam.SafeInvoke(param);
        }
コード例 #4
0
 private void Reset(LoadingData loadingData)
 {
     m_LoadingSystem     = new LoadingSystem(loadingData);
     this.m_Slider.Value = 0f;
     this.m_Effect.Widget.anchoredPosition = Vector2.zero;;
     this.m_Effect.EffectPrefabName        = "UI_jindutiao.prefab";
     this.m_Effect.Visible = true;
     this.m_tipIndex       = -1;
     this.timesection      = 0f;
 }
コード例 #5
0
 public LoadingSystem(LoadingData loadingData, string ui_name_ = null)
 {
     m_Time      = loadingData.m_time;
     m_Progress  = loadingData.m_progress;
     m_state     = loadingData.m_state;
     m_step      = 0;
     timesection = 0f;
     m_ui_name   = ui_name_;
     GameEvents.UIEvents.UI_Loading_Event.OnLoadingState     += OnLoadingOverState;
     GameEvents.UIEvents.UI_Loading_Event.OnLoadingStageTime += OnLoadingStageTime;
     GameEvents.UIEvents.UI_Loading_Event.OnChangeStageTime  += OnChangeStageTime;
 }
コード例 #6
0
        public override void OnShow(object param)
        {
            base.OnShow(param);
            if (param != null)
            {
                LoadingData loadingData = (LoadingData)param;
                Reset(loadingData);
                GameEvents.UIEvents.UI_Loading_Event.OnStartLoading.SafeInvoke();
            }

            cur_time   = 0.0f;
            is_show    = true;
            this.width = this.m_Slider.Widget.sizeDelta.x;
        }
コード例 #7
0
        public void LoadFacebook()
        {
            if (!GameRoot.instance.GameFSM.CurrentState.StateFlag.Equals((int)ClientFSM.ClientState.LOGIN))
            {
                float[] time     = new float[] { 6.5f };
                float[] progress = new float[] { 6.5f };
                bool[]  state    = new bool[] { true };

                LoadingData loadData = new LoadingData(time, progress, state, false);

                FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_FB_Loading);
                param.Param = loadData;
                EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
            }
        }