Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • GameEventManager

Index

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

  • get on_event(): number

Methods

  • add_callback(callback: Function): void
  • 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

  • fire_npc_events(npc: NPC): void
  • get_value(event_value: EventValue, stringfy?: boolean): any
  • 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.

  • handle_npc_interaction_end(npc: NPC, previous_npc_direction: directions): Promise<void>
  • manage_npc_dialog(npc: NPC, message: string): Promise<void>
  • remove_callback(callback: Function): 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

  • search_for_npc(): void
  • set_controls(): void
  • set_npc_and_hero_directions(npc: NPC): Promise<void>
  • set_npc_event(npc: NPC): Promise<void>
  • update(): void
  • get_interaction_directions(hero_x: number, hero_y: number, target_x: number, target_y: number, interaction_pattern: interaction_patterns, target_body_radius: number): { hero_direction: directions; target_direction: directions }

Generated using TypeDoc