Exemple #1
0
 public void Setup(Action tap, Action hold, Action release)
 {
     tapAction        = tap;
     holdAction       = hold;
     prereleaseAction = release;
     TimerMonoHook.Create(Update);
 }
Exemple #2
0
 public void DestroyHook()
 {
     madeHook = false;
     if (hook)
     {
         hook?.Destroy(onTimeEnd);
     }
     hook = null;
 }
Exemple #3
0
        public static OneTimeTimer StartTimer(float length, Action action)
        {
            OneTimeTimer  timer = new OneTimeTimer(length, action);
            GameObject    g     = new GameObject();
            TimerMonoHook hook  = g.AddComponent <TimerMonoHook>();

            hook.onUpdate = timer.Update;
            timer.hook    = hook;
            return(timer);
        }
Exemple #4
0
 public void Setup(Action tap, Action hold)
 {
     tapAction  = tap;
     holdAction = hold;
     TimerMonoHook.Create(Update);
 }
Exemple #5
0
 public void SetupTapOnly(Action tap)
 {
     tapAction = tap;
     TimerMonoHook.Create(Update);
 }
Exemple #6
0
 public void CreateHook()
 {
     madeHook = true;
     hook     = TimerMonoHook.Create(Update);
 }
Exemple #7
0
 public void AttachHookToObj(GameObject obj)
 {
     madeHook = true;
     hook     = TimerMonoHook.Create(Update, obj);
 }