generated from techno-dwarf-works/unity-package-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from techno-dwarf-works/refactoring
Version 0.0.3
- Loading branch information
Showing
4 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Assets/BetterTweens/Runtime/Triggers/CancellationTokenTrigger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Threading; | ||
using Better.Tweens.Runtime.Actions; | ||
|
||
namespace Better.Tweens.Runtime.Triggers | ||
{ | ||
public class CancellationTokenTrigger : ActionTrigger | ||
{ | ||
private readonly CancellationToken _cancellationToken; | ||
|
||
public CancellationTokenTrigger(string id, TweenCoreAction action, CancellationToken cancellationToken) | ||
: base(id, action) | ||
{ | ||
_cancellationToken = cancellationToken; | ||
} | ||
|
||
public override bool Invoke(TweenCore tweenCore) | ||
{ | ||
return _cancellationToken.IsCancellationRequested && base.Invoke(tweenCore); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/BetterTweens/Runtime/Triggers/CancellationTokenTrigger.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters