Skip to content

Instantly share code, notes, and snippets.

@gastrop0d
Created February 9, 2018 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gastrop0d/05b93045c957a07a7a92ee0257f7c3de to your computer and use it in GitHub Desktop.
Save gastrop0d/05b93045c957a07a7a92ee0257f7c3de to your computer and use it in GitHub Desktop.
public class StunnedAction : TimedAction
{
public void Begin()
{
QueryDispatcher.SubscribeToBool(QUERY_ADVANTAGE_GRANTED, GetAdvantage);
/* do other stuff like trigger a stunned animation... */
}
public void End()
{
QueryDispatcher.UnsubscribeFromBool(QUERY_ADVANTAGE_GRANTED, GetAdvantage);
/* do other stuff like reset our animation... */
}
BoolResult GetAdvantage( GameObject subject )
{
return new BoolResult( subject == _actor, true );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment