GOOC - Game Oriented Object C

GOOC - Game Oriented Object C

Next: Spawns, Previous: Subroutines, Up: Top
[Contents]

10. States

10. States

A state is an object's current mode of operation. Game objects are finite state machines, meaning that, at any point in their existance, they are in a certain state. States are divided into up three blocks of code (referred to as state subroutines), wherein a thread will run on: the code block, trans block, and event block. States also have rules to determine whether an object can change to that state or not.