| using System; | 
| using System.Collections.Generic; | 
| using System.IO; | 
| using UnityEngine; | 
| public class LaunchFadeOutTask : LaunchTask | 
| { | 
|     public override float expectTime | 
|     { | 
|         get { return LocalSave.GetFloat("LaunchFadeOutTask_ExpectTime", 1f); } | 
|         protected set { LocalSave.SetFloat("LaunchFadeOutTask_ExpectTime", value); } | 
|     } | 
|   | 
|     public override void Begin() | 
|     { | 
|         LaunchInHot.m_CurrentStage = LaunchStage.Complete; | 
|         duration = 0.5f; | 
|   | 
|         ShaderUtility.WarmUpAll(); | 
|         //SpeechTranslate.Instance.RequestGetToken(); | 
|          | 
|          | 
|   | 
|         var launchWin = UIManager.Instance.GetUI<LaunchWin>(); | 
|         if (launchWin != null) | 
|         { | 
|             launchWin.FadeOut(); | 
|         } | 
|   | 
|   | 
|         // try | 
|         // { | 
|         //     Main.Init();//考虑移到launchcomplete (launchinhot)里? | 
|         // } | 
|         // catch (Exception e) | 
|         // { | 
|         //     UnityEngine.Debug.LogError(e); | 
|         // } | 
|   | 
|         // try | 
|         // { | 
|         //     LogicLauncher.LaunchStart(); | 
|         // } | 
|         // catch (Exception e) | 
|         // { | 
|         //     UnityEngine.Debug.LogError(e); | 
|         // } | 
|     } | 
|   | 
|     public override void End() | 
|     { | 
|         expectTime = timer; | 
|         Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); | 
|   | 
|   | 
|     } | 
|   | 
|     public override void Update() | 
|     { | 
|         if (done) | 
|         { | 
|             return; | 
|         } | 
|         timer += Time.deltaTime; | 
|   | 
|         if (timer >= 0.5f)//&& ILLauncherProxy.Instance.started) | 
|         { | 
|             done = true; | 
|         } | 
|         else | 
|         { | 
|             done = false; | 
|             progress = Mathf.Clamp01(timer / expectTime); | 
|         } | 
|   | 
|         ExceptionReport(); | 
|     } | 
|   | 
| } |