Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

  • new CharFallEvent(game: any, data: any, active: any, key_name: any, keep_reveal: any, keep_custom_psynergy: any, is_npc: any, npc_label: any, 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, finish_events: any): CharFallEvent
  • Parameters

    • game: any
    • data: any
    • active: any
    • key_name: any
    • keep_reveal: any
    • keep_custom_psynergy: any
    • is_npc: any
    • npc_label: any
    • 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
    • finish_events: any

    Returns CharFallEvent

Properties

data: GoldenSun
finish_events: GameEvent[]
game: Game
is_npc: boolean
npc_label: string
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: {}

The events object where the keys are the ids.

Type declaration

id_incrementer: number

The GameEvents id incrementer.

labeled_events: {}

The events object where the keys are the events labels.

Type declaration

Accessors

  • get active(): boolean
  • get id(): number
  • get keep_reveal(): boolean
  • get key_name(): string
  • get origin_npc(): NPC

Methods

  • _destroy(): void
  • _fire(): Promise<void>
  • destroy(): void
  • This function is the one that should be called to destroy an event. It should never be overriden. Call this function to destroy this event. This can be called whenever an associated entity is destroyed, like maps, NPCs etc.

    Returns void

  • fire(origin_npc?: NPC): void
  • 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.

    Parameters

    • Optional origin_npc: NPC

      the NPC that originated this game event.

    Returns void

    if the child class has an async fire function, returns its Promise.

  • set_event_activation(activate: boolean): void
  • get_char(data: GoldenSun, options: { is_npc?: boolean; npc_index?: number; npc_label?: string }): Hero | NPC
  • A helper function that defines the ControllableChar based on inputs. The controllable char can be a hero or a npc.

    Parameters

    • data: GoldenSun

      The GoldenSun instance.

    • options: { is_npc?: boolean; npc_index?: number; npc_label?: string }

      Some options to help defining the char.

      • Optional is_npc?: boolean

        Whether it's a npc or not.

      • Optional npc_index?: number

        The npc index number.

      • Optional npc_label?: string

        The npc unique label identifier.

    Returns Hero | NPC

    the defined char.

  • get_labeled_event(key_name: string): GameEvent
  • reset(): void

Generated using TypeDoc