-
-
Save gastrop0d/05b93045c957a07a7a92ee0257f7c3de to your computer and use it in GitHub Desktop.
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
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