| using System; | 
| using System.Collections.Generic; | 
| using System.IO; | 
| using UnityEngine; | 
| public class ConfigInitTask : LaunchTask | 
| { | 
|     public override float expectTime | 
|     { | 
|         get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); } | 
|         protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); } | 
|     } | 
|   | 
|     float threshold = 1f; | 
|   | 
|     public override void Begin() | 
|     { | 
|         LaunchInHot.m_CurrentStage = LaunchStage.ConfigInit; | 
|         duration = Mathf.Max(0.5f, expectTime); | 
|         threshold = Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.9f; | 
|   | 
|         // LaunchPostProcess.Instance.Begin(); | 
|         // InitialFunctionConfig.Init(true);   //有更新再初始化一次 | 
|     } | 
|   | 
|     public override void End() | 
|     { | 
|         expectTime = timer; | 
|         Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); | 
|          | 
|         // TODO YYL | 
|         // OperationLogCollect.Instance.RecordLauchEvent(3); | 
|         // OperationLogCollect.Instance.RecordEvent(3); | 
|     } | 
|   | 
|     public override void Update() | 
|     { | 
|         if (done) | 
|         { | 
|             return; | 
|         } | 
|   | 
|         timer += Time.deltaTime; | 
|         // if (!ConfigInitiator.IsLoginConfigInited)\ | 
|         // TODO YYL | 
|         // if (!ConfigInitiator.done) | 
|         // { | 
|         //     done = false; | 
|         //     progress = timer / duration; | 
|         // } | 
|         // else | 
|         { | 
|             done = true; | 
|         } | 
|   | 
|         ExceptionReport(); | 
|     } | 
|   | 
| } |