The FSM framework we're going to use here is adapted from the C# FSM framework, which can be found at unifycommunity.com. That framework is again a part of the Deterministic Finite State Machine framework, based on Chapter 3.1 of Game Programming Gems 1, by Eric Dybsend. We'll only be looking at the differences between this FSM and the one we made earlier. The complete FSM can be found with the assets that come with the book. We'll now study how the framework works and how to use it to implement our tank AI.
AdvanceFSM and the
FSMState are the two main classes of our framework. Let's take a look at them.
AdvanceFSM class basically manages all the
FSMState(s) implemented, and keeps updated with the ...