Private finish_Private is_Private npc_Private optionsOptional dest_The destination collision layer index.
Optional ground_Whether the char will perform a ground hit animation.
Optional on_Callback to be called after hitting the ground.
Optional show_Whether an exclamation emoticon will appear over the char before falling.
Optional splash_The char will splash sweat drops before falling.
Optional teleport?: { Teleport info. If passed, the char will teleport to another map while falling.
The destination collision layer index in the dest map.
The teleport map key name destination.
The destination position.
The x tile position.
The y tile position.
Optional diminish_If true, the char will diminish instead of fall before teleport.
Optional on_Callback to be called before teleport begin.
Optional origin_The origin position that the char will be just after the teleport.
The x tile position.
The y tile position.
Optional send_If true, the char sprite will be brought to the top on z-index while falling.
Optional walking_Whether the char will performa a walking in the air animation before falling.
The final y-tile position that the char will reach after falling.
Static eventsThe events object where the keys are the ids.
Static id_The GameEvents id incrementer.
Static labeled_The events object where the keys are the events labels.
Whether this GameEvent is active or not.
The GameEvent id number.
If true, Reveal Psynergy won't be stopped on this event fire.
An unique label that identifies this GameEvent. This is optional.
The GameEvent type.
This function is the one that should be called to start a event. It should never be overriden. Always before this function is called, it's checked whether Reveal psynergy is being casted, if yes, it's stopped before this event start.
Optional origin_npc: NPCthe NPC that originated this game event.
if the child class has an async fire function, returns its Promise.
Static get_A helper function that defines the ControllableChar based on inputs. The controllable char can be a hero or a npc.
The GoldenSun instance.
Some options to help defining the char.
Optional is_Whether it's a npc or not.
Optional npc_The npc index number.
Optional npc_The npc unique label identifier.
the defined char.
Static get_Static get_Static reset
This is the class reponsible for general events of the game. Every game event class must inherit from this class. Whenever a game event is instantiated, this event receives an unique id. These ids are reset whenever a map is destroyed. In order to fire a GameEvent, calls GameEvent.fire. In order to destroy a game event, calls GameEvent.destroy. Game events can be fired from TileEvents, NPC or Interactable Objects interaction, map changes or other game events. For easy reference/example, check base/game_events/EmoticonEvent.ts. Whenever an asynchronous game event is fired, increments the GameEventManager.events_running_count, so the engine knows that there's an event going on. When the event is finished, decrements the same variable. If your event has internal states, don't forget to reset them on finish. When creating a new GameEvent class, add its instantiation in GameEventManager.get_event_instance factory method.