Skip to content

Instantly share code, notes, and snippets.

@DarrenTsung
Last active April 14, 2018 08:20
Show Gist options
  • Save DarrenTsung/188901a490c0af860ddcd704b3a3ced7 to your computer and use it in GitHub Desktop.
Save DarrenTsung/188901a490c0af860ddcd704b3a3ced7 to your computer and use it in GitHub Desktop.
Second example in my StateMachineBehaviour article
class TriggerContinueAfterDelay : LogicalStateMachineBehaviour {
[SerializeField] private float _delay = 1.0f;
void OnStateEntered() {
this.DoAfterDelay(this._delay, () => {
this.Animator.SetTrigger("Continue");
}
}
}
@nicmar
Copy link

nicmar commented Apr 14, 2018

Smart! But i think ); is missing on line 7. And where is DoAfterDelay? Is that an IEnumerator in the same class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment