This class is responsible for the class of events that are placed on the map. Generally, this kind of event is fired when the hero reaches the position where an event of this type is placed. Use these events to make the hero jump, slide, climb, teleport, etc. Tile Events are set as map properties (and sometimes, Interactable Objects can also create some Tile Events automatically).

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • game: any
    • data: any
    • x: any
    • y: any
    • activation_directions: any
    • initial_disabled_directions: any
    • activation_collision_layers: any
    • active_storage_key: any
    • affected_by_reveal: any
    • key_name: string
    • target: any
    • x_target: any
    • y_target: any
    • open_door: any
    • start_climbing: any
    • stop_climbing: any
    • dest_collision_layer: any
    • destination_direction: any
    • keep_encounter_cumulator: any
    • fade_camera: any
    • skip_checks: any
    • finish_before_fadeout: any
    • skip_map_change_events: any
    • fade_duration: any
    • door_settings: any
    • spiral_stair: any
    • on_event_toggle_layers: any
    • fade_color: any
    • dont_change_to_idle: any
    • play_sfx: any
    • custom_sfx: any
    • particles_info: any
    • custom_advance_time: any
    • custom_advance_shift: any
    • fade_on_advance: any
    • watery_filter_on_advance: any

    Returns TeleportEvent

Properties

_activation_collision_layers: Set<number>
_activation_directions: Set<directions>
_affected_by_reveal: Set<directions>
_allow_active_in_diagonal: boolean
_id: number
_initial_activation_directions: Set<directions>
_initial_disabled_directions: Set<directions>
_key_name: string
_location_key: number
_origin_interactable_object: InteractableObjects
_prev_alpha_shadow: number
_prev_alpha_sprite: number
_start_climbing: boolean
_stop_climbing: boolean
_x: number
_y: number
collision_layer_shift_from_source: number

The collision layer shift value from origin Inter. Obj. base collision layer that will be summed up to it which will form the activation collision layer of this event.

custom_advance_shift: number
custom_advance_time: number
custom_sfx: string
data: GoldenSun
dest_collision_layer: number
destination_direction: string
dont_change_to_idle: boolean
door_settings: {
    door_open_sfx: string;
    replace_map: {
        from_tile_id: number;
        offset_x: number;
        offset_y: number;
        origin_x: number;
        origin_y: number;
        tile_layer: string;
        to_tile_id: number;
    }[];
}

Type declaration

  • door_open_sfx: string
  • replace_map: {
        from_tile_id: number;
        offset_x: number;
        offset_y: number;
        origin_x: number;
        origin_y: number;
        tile_layer: string;
        to_tile_id: number;
    }[]
fade_camera: boolean
fade_color: string
fade_duration: number
fade_on_advance: boolean
fadein_callbacks: (() => void)[]

Type declaration

    • (): void
    • Returns void

finish_before_fadeout: boolean
finish_callbacks: (() => void)[]

Type declaration

    • (): void
    • Returns void

game: Game
in_map: boolean

Whether this event is in the map.

keep_encounter_cumulator: boolean
on_event_toggle_layers: string[]
open_door: boolean
particles_info: ParticlesInfo
play_sfx: boolean
skip_checks: boolean
skip_map_change_events: boolean
spiral_stair: "up" | "down"
target: string
watery_filter_on_advance: boolean
x_target: number
y_target: number
DEFAULT_DOOR_OPEN_SFX: string = "door/open_door"
DEFAULT_FADE_DURATION: number = 500
_events: {
    [id: number]: TileEvent;
}

Type declaration

id_incrementer: number
labeled_events: {
    [key_name: number]: TileEvent;
}

Type declaration

Accessors

  • get activation_collision_layers(): Set<number>
  • The set of collision layers that this event can be fired.

    Returns Set<number>

  • get allow_active_in_diagonal(): boolean
  • When activating this event in diagonal, and if this var is not true, the diagonal direction whether the hero is trying to activate this event won't be splitted.

    Returns boolean

Methods

  • Activates this event in all initial directions.

    Parameters

    • include_affected_by_reveal: boolean = false

      if true, it will also make this event sensible to reveal.

    Returns void

  • Tests whether a given direction is available to active this event. If no directions given, tests if at least one direction is active.

    Parameters

    • Optional direction: directions

      the direction to test if it's active.

    Returns boolean

    Returns whether it's active or not.

  • Updates the position of this event.

    Parameters

    • Optional x_tile: number

      the new x tile position.

    • Optional y_tile: number

      the new y tile position

    • change_in_map: boolean = false

      folow the position change up to map events list.

    Returns void