Skip to content

Commit

Permalink
Make AttachTimer return a Timer instance
Browse files Browse the repository at this point in the history
  • Loading branch information
akbiggs committed Jun 23, 2018
1 parent 848cce0 commit 0265161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/TimerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public static class TimerExtensions
/// <param name="isLooped">Whether the timer should restart after executing.</param>
/// <param name="useRealTime">Whether the timer uses real-time(not affected by slow-mo or pausing) or
/// game-time(affected by time scale changes).</param>
public static void AttachTimer(this MonoBehaviour behaviour, float duration, Action onComplete,
public static Timer AttachTimer(this MonoBehaviour behaviour, float duration, Action onComplete,
Action<float> onUpdate = null, bool isLooped = false, bool useRealTime = false)
{
Timer.Register(duration, onComplete, onUpdate, isLooped, useRealTime, behaviour);
return Timer.Register(duration, onComplete, onUpdate, isLooped, useRealTime, behaviour);
}
}

0 comments on commit 0265161

Please sign in to comment.