| | |
| | | {
|
| | | timer += Time.deltaTime;
|
| | | var progress = progressInfo.totalProgress + surplusProgress * (Time.deltaTime / surplusTime);
|
| | | progress = Mathf.Clamp(progress, 0, 0.95f);
|
| | | progress = Mathf.Clamp(progress, 0, 0.98f);
|
| | |
|
| | | var partProgress = 0f;
|
| | | if (currentTask == null)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var temp = currentTask.timer / Mathf.Min(1f, currentTask.duration);
|
| | | var temp = currentTask.timer / Mathf.Min(2f, currentTask.duration);
|
| | | partProgress = temp - (int)temp;
|
| | | }
|
| | |
|
| | |
| | | var memory = 2048;
|
| | | DeviceUtility.GetCpuAndMemory(out cpu, out memory);
|
| | | DebugEx.LogFormat("获得机器信息:cpu {0}----内存 {1}", cpu, memory);
|
| | | GameNotice.OpenGameNotice();
|
| | | }
|
| | |
|
| | | public override void Update()
|
| | |
| | | List<FileInfo> copyTasks = new List<FileInfo>();
|
| | |
|
| | | public override float expectTime {
|
| | | get { return LocalSave.GetFloat("AssetCopyTask_ExpectTime", 30f); }
|
| | | get { return LocalSave.GetFloat("AssetCopyTask_ExpectTime", 70f); }
|
| | | protected set { LocalSave.SetFloat("AssetCopyTask_ExpectTime", value); }
|
| | | }
|
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | outTime = 50f;
|
| | | #if UNITY_ANDROID
|
| | | switch (VersionConfig.Get().assetAccess)
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | if (!AssetDeCompressTask.assetDeCompressCompleted)
|
| | | {
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.ClientVersion;
|
| | | duration = expectTime;
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | #if UNITY_ANDROID
|
| | | if (InGameDownTestUtility.enable || !Application.isEditor)
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.CheckAsset;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | ServerListCenter.Instance.RequestJumpUrl();
|
| | | OperationLogCollect.Instance.RecordLauchEvent(2);
|
| | |
| | | {
|
| | | expectTime = timer;
|
| | | DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer);
|
| | | GameNotice.OpenGameNotice();
|
| | | }
|
| | |
|
| | | public override void Update()
|
| | |
| | | {
|
| | | m_CurrentStage = LaunchStage.DownLoad;
|
| | |
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | if (VersionUtility.Instance.NeedDownAsset())
|
| | | {
|
| | | if (!AssetVersionUtility.priorAssetDownLoadDone)
|
| | |
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetBundleInit;
|
| | |
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | if (!AssetSource.allFromEditor)
|
| | | {
|
| | | AssetBundleUtility.Instance.Sync_LoadAll("ui/prioritywindow");
|
| | |
| | | public class ConfigInitTask : LaunchTask
|
| | | {
|
| | | public override float expectTime {
|
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", inferredTime); }
|
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); }
|
| | | protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); }
|
| | | }
|
| | |
|
| | | float threshold = 1f;
|
| | | float inferredTime = 3f;
|
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | inferredTime = LocalSave.GetFloat("AssetCopyTask_ExpectTime", 30f) / 30f * 10f;
|
| | |
|
| | | m_CurrentStage = LaunchStage.ConfigInit;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | threshold = Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.9f;
|
| | |
|
| | | LaunchPostProcess.Instance.Begin();
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.Complete;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | LuaUtility.Instance.Init();
|
| | | CSharpCallLua.Init();
|
| | |
| | | {
|
| | | launchWin.FadeOut();
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true);
|
| | | }
|
| | |
|
| | | public override void End()
|
| | | {
|
| | | expectTime = timer;
|
| | | DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer);
|
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true);
|
| | | var launchBackGroundWin = WindowCenter.Instance.Get<LaunchBackGroundWin>();
|
| | | launchBackGroundWin.transform.SetAsFirstSibling();
|
| | | }
|