yyl
2 天以前 5d3366f2e0f687995eb7ad2107c4379fe7acd4e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
 
 
 
 
 
using UnityEngine;
 
public abstract class LaunchTask
{
    public float timer { get; protected set; }
    public float duration { get; protected set; }
    bool exceptionReported = false;
 
    public bool done { get; protected set; }
    public float progress { get; protected set; }
    public virtual float expectTime { get; protected set; }
 
    protected float outTime = 15f;
 
    public abstract void Begin();
    public abstract void Update();
    public abstract void End();
 
    public void ExceptionReport()
    {
        if (!exceptionReported && timer > outTime && !done)
        {
            var content = string.Format("任务:{0};网络状态:{1}", this.GetType().Name, Application.internetReachability);
            exceptionReported = true;
        }
    }
 
}