Converting firing behaviour to an action

AntL

Member
Hi there, I have a class which deals with an AI firing a weapon and currently uses coroutines for functionality such as reloading delays, pauses between rounds being fired etc. I’m looking at how to convert this functionality to an action but I’m a little uncertain as to the best way ahead. Should I keep this functionality in a mono behaviour ( triggered from an action) or try to fully integrate it into a behaviour tree? Are there any examples of behaviour trees with similar functionality to this?

Thanks for any help
 
This completely depends on your game design but for the Ultimate Character Controller I kept it as a MonoBehavior so the same code can be called for both AI agents and player controlled characters.
 
Top