Skip to content

Commit

Permalink
Merge pull request #47 from AnnulusGames/feature-motion-dispatcher-clear
Browse files Browse the repository at this point in the history
Add: MotionDispatcher.Clear()
  • Loading branch information
AnnulusGames authored Jan 15, 2024
2 parents 611a20d + 1c09724 commit 214115a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/LitMotion/Assets/LitMotion/Runtime/MotionDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ static MinimumList<IUpdateRunner> GetRunnerList(PlayerLoopTiming playerLoopTimin

[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Init()
{
Clear();
}

/// <summary>
/// Cancel all motions.
/// </summary>
public static void Clear()
{
foreach (var playerLoopTiming in playerLoopTimings)
{
Expand Down

0 comments on commit 214115a

Please sign in to comment.