Glue:Reference:Code:State Enumerations


Every state in Glue has a corresponding value in an enumeration. The name of the containing enumeration depends on the state.

Enumeration Names

The default enumeration is VariableState. To prevent naming conflicts, the enumeration is defined inside the class of the given element. For example, if a Screen named “TitleScreen” included uncategorized states then the following qualified enumeration would be created:

If an uncategorized state were part of an Entity called “Player” then the fully qualified name would be:

If the Screen contained two States (one named “Big” and one named “Small”) the enumeration would be defined as follows:

States will appear in the VariableState enumeration if they are either uncategorized, or if they belong in a category which has its SharesVariablesWithOtherCategories value set to true.

Categories which have SharesVariablesWithOtherCategories set to false will create their own enumerations. The name of the enumeration will match the name of the category.