public void Setup(Action tap, Action hold, Action release) { tapAction = tap; holdAction = hold; prereleaseAction = release; TimerMonoHook.Create(Update); }
public void DestroyHook() { madeHook = false; if (hook) { hook?.Destroy(onTimeEnd); } hook = null; }
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); }
public void Setup(Action tap, Action hold) { tapAction = tap; holdAction = hold; TimerMonoHook.Create(Update); }
public void SetupTapOnly(Action tap) { tapAction = tap; TimerMonoHook.Create(Update); }
public void CreateHook() { madeHook = true; hook = TimerMonoHook.Create(Update); }
public void AttachHookToObj(GameObject obj) { madeHook = true; hook = TimerMonoHook.Create(Update, obj); }