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; }
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; }
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); }
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; }
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; }
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; }
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); } }