Constructors

Properties

control_enable: boolean
data: GoldenSun
events_running_count: number

The game events counter. This variable shows how many game events are running at the moment.

fire_next_step: Function
game: Game
update_callbacks: Function[] = []

Accessors

Methods

  • Sets any custom callback to be called on update function while any game event is in action.

    Parameters

    • callback: Function

      the callback to be called.

    Returns void

  • Gets any kind of engine value that the engine user may want use in game events. This function is used in BranchEvents, for instance. The values used for comparison in this kind of event are retrieved using this function.

    Parameters

    • event_value: EventValue

      The value specification.

    • stringfy: boolean = false

      if true, will stringfy position objects.

    Returns any

    The engine value issued by the user.

  • Ends the hero and npc interaction.

    Parameters

    • npc: NPC

      The NPC to end interaction.

    • previous_npc_direction: directions

      the previous npc interaction before it start.

    Returns Promise<void>

  • Starts common npc dialogs.

    Parameters

    • npc: NPC

      The NPC to dialog with.

    • message: string

      The NPC dialog message.

    Returns Promise<void>

  • Removes the given callback of the list of callbacks that are called while any game event is in action. The given callback must be already added by calling GameEventManager.add_callback method.

    Parameters

    • callback: Function

      the callback to be removed.

    Returns void

  • Make hero and npc look each other.

    Parameters

    • npc: NPC

      The NPC that the hero is interacting with.

    Returns Promise<void>