Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • new FallEvent(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, y_destination_position: any, dest_collision_layer: any, show_exclamation_emoticon: any, splash_sweat_drops: any, walking_in_the_air: any, ground_hit_animation: any, teleport: any): FallEvent
  • 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
    • y_destination_position: any
    • dest_collision_layer: any
    • show_exclamation_emoticon: any
    • splash_sweat_drops: any
    • walking_in_the_air: any
    • ground_hit_animation: any
    • teleport: any

    Returns FallEvent

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
_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.

data: GoldenSun
game: Game
in_map: boolean

Whether this event is in the map.

options: { dest_collision_layer?: number; ground_hit_animation?: boolean; show_exclamation_emoticon?: boolean; splash_sweat_drops?: boolean; teleport?: { dest_collision_layer: number; destination: string; destination_position: { x: number; y: number }; diminish_on_transition?: boolean; origin_position?: { x: number; y: number }; send_to_front_on_teleport?: boolean; on_before_teleport?: any }; walking_in_the_air?: boolean; y_destination_position: number; on_fall_finish_callback?: any }

Type declaration

  • Optional dest_collision_layer?: number

    The destination collision layer index.

  • Optional ground_hit_animation?: boolean

    Whether the char will perform a ground hit animation.

  • Optional show_exclamation_emoticon?: boolean

    Whether an exclamation emoticon will appear over the char before falling.

  • Optional splash_sweat_drops?: boolean

    The char will splash sweat drops before falling.

  • Optional teleport?: { dest_collision_layer: number; destination: string; destination_position: { x: number; y: number }; diminish_on_transition?: boolean; origin_position?: { x: number; y: number }; send_to_front_on_teleport?: boolean; on_before_teleport?: any }

    Teleport info. If passed, the char will teleport to another map while falling.

    • dest_collision_layer: number

      The destination collision layer index in the dest map.

    • destination: string

      The teleport map key name destination.

    • destination_position: { x: number; y: number }

      The destination position.

      • x: number

        The x tile position.

      • y: number

        The y tile position.

    • Optional diminish_on_transition?: boolean

      If true, the char will diminish instead of fall before teleport.

    • Optional origin_position?: { x: number; y: number }

      The origin position that the char will be just after the teleport.

      • x: number

        The x tile position.

      • y: number

        The y tile position.

    • Optional send_to_front_on_teleport?: boolean

      If true, the char sprite will be brought to the top on z-index while falling.

    • on_before_teleport?:function
      • on_before_teleport(): void
  • Optional walking_in_the_air?: boolean

    Whether the char will performa a walking in the air animation before falling.

  • y_destination_position: number

    The final y-tile position that the char will reach after falling.

  • on_fall_finish_callback?:function
    • on_fall_finish_callback(): void
_events: {}

Type declaration

id_incrementer: number
labeled_events: {}

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

  • get id(): number
  • get initial_activation_directions(): Set<directions>
  • get key_name(): string
  • get location_key(): number
  • get x(): number
  • get y(): number
  • get events(): {}

Methods

  • activate(include_affected_by_reveal?: boolean): void
  • 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

  • check_if_disabled_by_storage(): boolean
  • check_position(): boolean
  • deactivate(): void
  • deactivate_at(direction: directions | "all"): void
  • destroy(): void
  • fire(): void
  • is_active(): boolean
  • is_active_at_collision_layer(collision_layer: number): boolean
  • is_active_at_direction(direction?: directions): boolean
  • set_activation_collision_layers(...collision_layers_indexes: number[]): void
  • set_position(x_tile?: number, y_tile?: number, change_in_map?: boolean): void
  • 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

  • update(): void
  • get_labeled_event(key_name: string): TileEvent
  • reset(): void

Generated using TypeDoc