Libraries.Game.GameStateManager Documentation

The GameStateManager is an internal class, used by the game engine to communicate between Quorum and plugin code. Most users will never have to interface with this class directly.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAccessibility()This action returns the AccessibilityManager that is being used across the Game.
GetApplication()This action returns the application stored by the plugins.
GetFocus()This action returns the current Item that is focused.
GetFocusManager()This action returns the FocusManager which is being used across the Game.
GetFontManager()This action returns the FontManager which is being used across the Game.
GetGame()This action returns a reference to the Game class.
GetGameDisplay()This action returns the GameDisplay stored by the plugins.
GetGameGraphics()This action returns the GraphicsManager stored by the plugins.
GetHashCode()This action gets the hash code for an object.
GetInput()This action returns a GameInput object that is stored in the plugins.
GetMainThreadName()This action returns the identifier for the main thread.
GetNativePath()This action returns the path of the native file loaded by the engine.
GetOperatingSystem()This action returns a text flag indicating what operating system the game is running on.
IsDisplayAvailable()The IsDisplayAvailable action returns whether or not a display is available to draw on.
SetAccessibility(Libraries.Interface.Accessibility accessibility)This action sets the Accessibility to be used across the Game.
SetApplication(Libraries.Game.Application app)This action is used by the engine to set the game's application info in the plugins.
SetFocus(Libraries.Interface.Item item)This action sets the focus on the given item.
SetFocusManager(Libraries.Game.FocusManager manager)This action sets the FocusManager to be used across the Game.
SetFontManager(Libraries.Game.Graphics.Fonts.FontManager manager)This action sets the FontManager to be used across the Game.
SetGame(Libraries.Game.Game game)This action is used by the engine to store a reference to the currently running Game class.
SetGameDisplay(Libraries.Game.GameDisplay disp)This action is used by the engine to set the game's display info in the plugins.
SetGameGraphics(Libraries.Game.Graphics.GraphicsManager gl20)This action is used by the engine to set the game's graphics manager in the plugins.
SetInput(Libraries.Game.GameInput gameInput)This action sets a GameInput object to be stored in the plugins.
SetMainThreadName(text name)This action sets the identifier for the main thread.
SetNativePath(text path)This action sets a path to the native file used to load the engine's C plugins.
SetOperatingSystem(text os)This action sets a flag in the plugins indicating what operating system the game is running on.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetAccessibility()

This action returns the AccessibilityManager that is being used across the Game.

Return

Libraries.Interface.Accessibility:

GetApplication()

This action returns the application stored by the plugins.

Return

Libraries.Game.Application:

GetFocus()

This action returns the current Item that is focused.

Return

Libraries.Interface.Item:

GetFocusManager()

This action returns the FocusManager which is being used across the Game.

Return

Libraries.Game.FocusManager:

GetFontManager()

This action returns the FontManager which is being used across the Game.

Return

Libraries.Game.Graphics.Fonts.FontManager:

GetGame()

This action returns a reference to the Game class.

Return

Libraries.Game.Game:

GetGameDisplay()

This action returns the GameDisplay stored by the plugins.

Return

Libraries.Game.GameDisplay:

GetGameGraphics()

This action returns the GraphicsManager stored by the plugins.

Return

Libraries.Game.Graphics.GraphicsManager:

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetInput()

This action returns a GameInput object that is stored in the plugins.

Return

Libraries.Game.GameInput:

GetMainThreadName()

This action returns the identifier for the main thread. Any work that interacts directly with teh graphics system, including adding or removing items from the game, must be done on the main thread -- otherwise, an error will occur.

Return

text:

GetNativePath()

This action returns the path of the native file loaded by the engine.

Return

text:

GetOperatingSystem()

This action returns a text flag indicating what operating system the game is running on.

Return

text:

IsDisplayAvailable()

The IsDisplayAvailable action returns whether or not a display is available to draw on. If no display is available, actions that try to create or draw graphics (such as loading a Drawable) will create an error. This will return false if called before StartGame() is called in the Game class, and will typically return true after the game has been started.

Return

boolean:

SetAccessibility(Libraries.Interface.Accessibility accessibility)

This action sets the Accessibility to be used across the Game.

Parameters

SetApplication(Libraries.Game.Application app)

This action is used by the engine to set the game's application info in the plugins.

Parameters

SetFocus(Libraries.Interface.Item item)

This action sets the focus on the given item.

Parameters

SetFocusManager(Libraries.Game.FocusManager manager)

This action sets the FocusManager to be used across the Game.

Parameters

SetFontManager(Libraries.Game.Graphics.Fonts.FontManager manager)

This action sets the FontManager to be used across the Game.

Parameters

SetGame(Libraries.Game.Game game)

This action is used by the engine to store a reference to the currently running Game class.

Parameters

SetGameDisplay(Libraries.Game.GameDisplay disp)

This action is used by the engine to set the game's display info in the plugins.

Parameters

SetGameGraphics(Libraries.Game.Graphics.GraphicsManager gl20)

This action is used by the engine to set the game's graphics manager in the plugins.

Parameters

SetInput(Libraries.Game.GameInput gameInput)

This action sets a GameInput object to be stored in the plugins.

Parameters

SetMainThreadName(text name)

This action sets the identifier for the main thread. Any work that interacts directly with the graphics system, including adding or removing items from the game, must be done on the main thread. This is set automatically by the game engine, and users should never need to call this directly.

Parameters

SetNativePath(text path)

This action sets a path to the native file used to load the engine's C plugins. After setting the path, the engine will load the native file.

Parameters

SetOperatingSystem(text os)

This action sets a flag in the plugins indicating what operating system the game is running on.

Parameters