Comments

  • The AIEnemy class encapsulates all enemy behaviors, controlled by an FSM
  • To start coding an FSM, all possible states are encoded into an enumeration: Idle, Chase, Attack, and Dead
  • The mActiveState variable represents the currently active state right now, within the FSM

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.