Esempio n. 1
0
 //重置接口
 public void Reset()
 {
     IsStart = false;
     IsPause = false;
     //新增这一行↓
     CenterTimer.RemoveTimer(this);
 }
Esempio n. 2
0
 void End()
 {
     IsStart = false;
     if (OnEnd != null)
     {
         OnEnd();
     }
     CenterTimer.RemoveTimer(this);
 }
Esempio n. 3
0
 //计时器结束
 void End()
 {
     IsStart = false;
     FinishCount++;
     if (OnEnd != null)
     {
         OnEnd();
     }
     //新增这一行↓
     CenterTimer.RemoveTimer(this);
 }
Esempio n. 4
0
 public void Start()
 {
     IsStart   = true;
     StartTime = Time.time;
     CurTime   = StartTime;
     EndTime   = StartTime + Duration;
     CenterTimer.AddTimer(this);
     if (OnStart != null)
     {
         OnStart();
     }
 }