Messages related to the Go module.

Static variables

@:value(new Message<Void>("acquire_input_focus"))staticread onlyacquire_input_focus:Message<Void> = new Message<Void>("acquire_input_focus")

Acquires the user input focus.

Post this message to a game object instance to make that instance acquire the user input focus.

User input is distributed by the engine to every instance that has requested it. The last instance to request focus will receive it first. This means that the scripts in the instance will have first-hand-chance at reacting on user input, possibly consuming it so that no other instances can react on it. The most common case is for a script to send this message to itself when it needs to respond to user input.

A script belonging to an instance which has the user input focus will receive the input actions in its on_input callback function. See on_input for more information on how user input can be handled.

@:value(new Message<Void>("disable"))staticread onlydisable:Message<Void> = new Message<Void>("disable")

Disables the receiving component.

This message disables the receiving component. All components are enabled by default, which means they will receive input, updates and be a part of the simulation. A component is disabled when it receives the disable message.

Note! Components that currently supports this message are:

  • Collection Proxy
  • Collision Object
  • Gui
  • Label
  • Spine Model
  • Sprite
  • Tile Grid
  • Model

@:value(new Message<Void>("enable"))staticread onlyenable:Message<Void> = new Message<Void>("enable")

Enables the receiving component.

This message enables the receiving component. All components are enabled by default, which means they will receive input, updates and be a part of the simulation. A component is disabled when it receives the disable message.

Note! Components that currently supports this message are:

  • Collection Proxy
  • Collision Object
  • Gui
  • Spine Model
  • Sprite
  • Tile Grid
  • Model

@:value(new Message<Void>("release_input_focus"))staticread onlyrelease_input_focus:Message<Void> = new Message<Void>("release_input_focus")

Releases the user input focus.

Post this message to an instance to make that instance release the user input focus. See acquire_input_focus for more information on how the user input handling works.

@:value(new Message<GoMessageSetParent>("set_parent"))staticread onlyset_parent:Message<GoMessageSetParent> = new Message<GoMessageSetParent>("set_parent")

Sets the parent of the receiving instance.

When this message is sent to an instance, it sets the parent of that instance. This means that the instance will exist in the geometrical space of its parent, like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world space. A script can send this message to itself to set the parent of its instance.