Exemplo n.º 1
0
    public void Delay(float delayTime, Action callBack)
    {
        TimerCollection.Callback delayFunc = () =>
        {
            callBack();
        };
        Timer _timer = TimerCollection.GetInstance().Create(delayFunc, true, null);

        _timer.Start(delayTime);
    }
Exemplo n.º 2
0
 public void PlayAudio(string name, Action callBack, float delayTime = 0.5f)
 {
     name = "GUIDE/MessageTree/" + name;
     AudioPlayer.Instance.PlayAudio(name, Vector3.zero, false, (res) =>
     {
         if (delayTime <= 0.0f)
         {
             callBack();
         }
         else
         {
             TimerCollection.Callback delayFunc = () =>
             {
                 callBack();
             };
             Timer _timer = TimerCollection.GetInstance().Create(delayFunc, true, null);
             _timer.Start(delayTime);
         }
     });
 }
Exemplo n.º 3
0
 public Timer(TimerCollection.Callback _func, bool autoR, TimerCollection.CallbackWithTime _funcWithTime)
 {
     func = _func;
     funcWithTime = _funcWithTime;
     autoRelease = autoR;
 }
Exemplo n.º 4
0
    public Timer(TimerCollection.Callback _func, TimerCollection.CallbackWithTime _funcWithTime)
    {
		func = _func;
        funcWithTime = _funcWithTime;
        autoRelease = false;
	}
Exemplo n.º 5
0
 public Timer(TimerCollection.Callback _func, bool autoR, TimerCollection.CallbackWithTime _funcWithTime)
 {
     func         = _func;
     funcWithTime = _funcWithTime;
     autoRelease  = autoR;
 }
Exemplo n.º 6
0
 public Timer(TimerCollection.Callback _func, TimerCollection.CallbackWithTime _funcWithTime)
 {
     func         = _func;
     funcWithTime = _funcWithTime;
     autoRelease  = false;
 }