Options
All
  • Public
  • Public/Protected
  • All
Menu

The rope dock interactable object. The rope fragments and rope events are created from this object.

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

  • new RopeDock(game: any, data: any, key_name: any, map_index: any, x: any, y: any, storage_keys: any, allowed_tiles: any, base_collision_layer: any, not_allowed_tiles: any, object_drop_tiles: any, anchor_x: any, anchor_y: any, scale_x: any, scale_y: any, block_climb_collision_layer_shift: any, events_info: any, enable: any, entangled_by_bush: any, toggle_enable_events: any, label: any, allow_jumping_over_it: any, allow_jumping_through_it: any, psynergies_info: any, has_shadow: any, animation: any, action: any, snapshot_info: any, affected_by_reveal: any, active: any, visible: any): RopeDock
  • Parameters

    • game: any
    • data: any
    • key_name: any
    • map_index: any
    • x: any
    • y: any
    • storage_keys: any
    • allowed_tiles: any
    • base_collision_layer: any
    • not_allowed_tiles: any
    • object_drop_tiles: any
    • anchor_x: any
    • anchor_y: any
    • scale_x: any
    • scale_y: any
    • block_climb_collision_layer_shift: any
    • events_info: any
    • enable: any
    • entangled_by_bush: any
    • toggle_enable_events: any
    • label: any
    • allow_jumping_over_it: any
    • allow_jumping_through_it: any
    • psynergies_info: any
    • has_shadow: any
    • animation: any
    • action: any
    • snapshot_info: any
    • affected_by_reveal: any
    • active: any
    • visible: any

    Returns RopeDock

Properties

_breakable: boolean
_dest_rope_dock: RopeDock

The staring rope dock. null if it's the starting rope dock.

_dest_x: number

The destiny dock x tile position.

_dest_y: number

The destiny dock y tile position.

_extra_sprites: (Sprite | Group | Graphics)[]
_frag_able_to_swing: boolean[]

Array of booleans that says whether a frag can swing or not.

_frag_overlap_group: Group

Not practical group. Holds a copy of the first OVERLAP_LIMIT frags to show over the dock.

_fragment_angle: number

The angle in which the rope fragments are.

_hero_walking_factor: number

Factor that will increase rope bounce on hero walk.

_is_rope_dock: boolean
_is_starting_dock: boolean

Whether this event is the rope starting dock.

_pushable: boolean
_rollable: boolean
_rope_frag_base_pos: { x: number; y: number }[]

Rope fragments base positions.

_rope_fragments_group: Group

Groups that holds the rope fragments.

_rope_width: number

The rope width. Only x axis.

_tied: boolean

Whether the rope is tied or not. This variable is only used if it's a starting dock.

_whirlwind_source: boolean
allow_jumping_over_it: boolean
allow_jumping_through_it: boolean
anchor_x: number
anchor_y: number
data: GoldenSun
game: Game
scale_x: number
scale_y: number
sprite: Sprite
storage_keys: { action?: string; active?: string; affected_by_reveal?: string; anchor?: string; animation?: string; base_collision_layer?: string; enable?: string; entangled_by_bush?: string; position?: string; position_px?: string; scale?: string; visible?: string }

Type declaration

  • Optional action?: string
  • Optional active?: string
  • Optional affected_by_reveal?: string
  • Optional anchor?: string
  • Optional animation?: string
  • Optional base_collision_layer?: string
  • Optional enable?: string
  • Optional entangled_by_bush?: string
  • Optional position?: string
  • Optional position_px?: string
  • Optional scale?: string
  • Optional visible?: string
swing_tween: Tween

The tween that controls the rope bounce.

HERO_CLIMB_Y_SHIFT: -2 = -2
HERO_WALKING_DELTA: 0.015 = 0.015
MAX_FRAG_SPIRAL: 20 = 20
ROPE_DOCK_EMPTY: "dock_empty" = "dock_empty"
ROPE_DOCK_KEY: "rope_dock" = "rope_dock"
ROPE_DOCK_TIED: "dock_tied" = "dock_tied"
ROPE_FRAGMENT: "rope_fragment" = "rope_fragment"
ROPE_FRAGMENT_WIDTH: 8 = 8
ROPE_Y_SHIFT: 1 = 1
SPIRAL_ANG_VELOCITY: 88 = 88
SPIRAL_VELOCITY: 60 = 60
SPIRAL_X_SHIFT: -2 = -2
SPIRAL_Y_SHIFT: 4 = 4
SWING_SIZE: 6 = 6
SWING_TIME: 175 = 175

Accessors

  • get active(): boolean
  • get active_filters(): { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }
  • An object containing which filters are active in this IO.

    Returns { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }

    • color_blend: boolean
    • colorize: boolean
    • flame: boolean
    • gray: boolean
    • hue: boolean
    • levels: boolean
    • mode7: boolean
    • outline: boolean
    • pixel_shift: boolean
    • tint: boolean
    • watery: boolean
  • get affected_by_reveal(): boolean
  • get after_psynergy_cast_events(): {}
  • Object that contains lists of Game Events to fired per psynergy after it finishes. Psynergy is the key, the list of events is the value of this object.

    Returns {}

  • get base_collision_layer(): number
  • get before_psynergy_cast_events(): {}
  • Object that contains lists of Game Events to fired per psynergy before it starts. Psynergy is the key, the list of events is the value of this object.

    Returns {}

  • get blocking_stair_block(): Body
  • get body(): any
  • get breakable(): boolean
  • get bush_sprite(): Sprite
  • get collision_tiles_bodies(): Body[]
  • get color_blend_filter(): ColorBlend
  • get colorize_filter(): Colorize
  • get current_action(): string
  • get current_animation(): string
  • get dest_x(): number
  • get dest_y(): number
  • get enable(): boolean
  • get entangled_by_bush(): boolean
  • get flame_filter(): Flame
  • get frag_able_to_swing(): boolean[]
  • get fragment_angle(): number
  • get gray_filter(): Gray
  • get has_shadow(): boolean
  • get height(): number
  • get hue_filter(): Hue
  • get is_interactable_object(): boolean
  • get is_rope_dock(): boolean
  • get is_starting_dock(): boolean
  • get key_name(): string
  • get label(): string
  • get levels_filter(): Levels
  • get map_index(): number
  • get object_drop_tiles(): { animation_duration: number; dest_x: number; dest_y: number; destination_collision_layer: number; dust_animation: boolean; water_animation: boolean; x: number; y: number }[]
  • Returns { animation_duration: number; dest_x: number; dest_y: number; destination_collision_layer: number; dust_animation: boolean; water_animation: boolean; x: number; y: number }[]

  • get psynergies_info(): {}
  • get psynergy_casted(): {}
  • get pushable(): boolean
  • get rollable(): boolean
  • get rope_frag_base_pos(): { x: number; y: number }[]
  • get rope_fragments_group(): Group
  • get rope_width(): number
  • get shadow(): Sprite
  • get shapes_collision_active(): boolean
  • get snapshot_info(): { action: string; active: boolean; active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }; allow_jumping_over_it: boolean; allow_jumping_through_it: boolean; anchor: { x: number; y: number }; anim_is_playing: boolean; animation: string; base_collision_layer: number; body_in_map: boolean; enable: boolean; entangled_by_bush: boolean; filter_settings?: FilterSettings; frame: string; index: number; key_name: string; position: { x: number; x_px: number; y: number; y_px: number }; psynergy_casted: {}; scale: { x: number; y: number }; send_to_back: boolean; send_to_front: boolean; shadow: { x: number; y: number }; shapes_collision_active: boolean; state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }; type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }; visible: boolean }
  • Returns { action: string; active: boolean; active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }; allow_jumping_over_it: boolean; allow_jumping_through_it: boolean; anchor: { x: number; y: number }; anim_is_playing: boolean; animation: string; base_collision_layer: number; body_in_map: boolean; enable: boolean; entangled_by_bush: boolean; filter_settings?: FilterSettings; frame: string; index: number; key_name: string; position: { x: number; x_px: number; y: number; y_px: number }; psynergy_casted: {}; scale: { x: number; y: number }; send_to_back: boolean; send_to_front: boolean; shadow: { x: number; y: number }; shapes_collision_active: boolean; state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }; type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }; visible: boolean }

    • action: string
    • active: boolean
    • active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }
      • color_blend: boolean
      • colorize: boolean
      • flame: boolean
      • gray: boolean
      • hue: boolean
      • levels: boolean
      • mode7: boolean
      • outline: boolean
      • pixel_shift: boolean
      • tint: boolean
      • watery: boolean
    • allow_jumping_over_it: boolean
    • allow_jumping_through_it: boolean
    • anchor: { x: number; y: number }
      • x: number
      • y: number
    • anim_is_playing: boolean
    • animation: string
    • base_collision_layer: number
    • body_in_map: boolean
    • enable: boolean
    • entangled_by_bush: boolean
    • Optional filter_settings?: FilterSettings
    • frame: string
    • index: number
    • key_name: string
    • position: { x: number; x_px: number; y: number; y_px: number }
      • x: number
      • x_px: number
      • y: number
      • y_px: number
    • psynergy_casted: {}
      • [field_psynergy_key: string]: boolean
    • scale: { x: number; y: number }
      • x: number
      • y: number
    • send_to_back: boolean
    • send_to_front: boolean
    • shadow: { x: number; y: number }
      • x: number
      • y: number
    • shapes_collision_active: boolean
    • state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }
      • Optional breakable?: { one_level_broken: boolean; two_level_broken: boolean }
        • one_level_broken: boolean
        • two_level_broken: boolean
      • Optional pushable?: { docked: boolean }
        • docked: boolean
      • Optional rollable?: { pillar_is_stuck: boolean }
        • pillar_is_stuck: boolean
      • Optional rope_dock?: { tied: boolean }
        • tied: boolean
    • type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }
      • breakable: boolean
      • is_rope_dock: boolean
      • rollable: boolean
    • visible: boolean
  • get tied(): boolean
  • get tile_pos(): { x: number; y: number }
  • get tile_x_pos(): number
  • get tile_y_pos(): number
  • get tint_filter(): Tint
  • get whirlwind_source(): boolean
  • get width(): number
  • get x(): number
  • set x(x: number): void
  • get y(): number
  • set y(y: number): void

Methods

  • add_unset_callback(callback: (() => void)): void
  • change_collision_layer(destination_collision_layer: number, update_on_map?: boolean): void
  • check_psynergy_casted_on_restore(): void
  • check_storage_keys(): void
  • clear_snapshot(): void
  • config_body(): void
  • create_engine_storage_key(property_name: string): string
  • custom_unset(): void
  • destroy_body(update_map?: boolean): void
  • destroy_bush(): void
  • destroy_collision_tiles_bodies(): void
  • destroy_overlapping_fragments(): void
  • find_dest_dock(map: Map): void
  • get_body_radius(): number
  • get_current_position(): { x: number; y: number }
  • init_bush(map: Map): void
  • initial_config(map: Map, snapshot_info: { action: string; active: boolean; active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }; allow_jumping_over_it: boolean; allow_jumping_through_it: boolean; anchor: { x: number; y: number }; anim_is_playing: boolean; animation: string; base_collision_layer: number; body_in_map: boolean; enable: boolean; entangled_by_bush: boolean; filter_settings?: FilterSettings; frame: string; index: number; key_name: string; position: { x: number; x_px: number; y: number; y_px: number }; psynergy_casted: {}; scale: { x: number; y: number }; send_to_back: boolean; send_to_front: boolean; shadow: { x: number; y: number }; shapes_collision_active: boolean; state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }; type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }; visible: boolean }): void
  • Parameters

    • map: Map
    • snapshot_info: { action: string; active: boolean; active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }; allow_jumping_over_it: boolean; allow_jumping_through_it: boolean; anchor: { x: number; y: number }; anim_is_playing: boolean; animation: string; base_collision_layer: number; body_in_map: boolean; enable: boolean; entangled_by_bush: boolean; filter_settings?: FilterSettings; frame: string; index: number; key_name: string; position: { x: number; x_px: number; y: number; y_px: number }; psynergy_casted: {}; scale: { x: number; y: number }; send_to_back: boolean; send_to_front: boolean; shadow: { x: number; y: number }; shapes_collision_active: boolean; state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }; type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }; visible: boolean }
      • action: string
      • active: boolean
      • active_filters: { color_blend: boolean; colorize: boolean; flame: boolean; gray: boolean; hue: boolean; levels: boolean; mode7: boolean; outline: boolean; pixel_shift: boolean; tint: boolean; watery: boolean }
        • color_blend: boolean
        • colorize: boolean
        • flame: boolean
        • gray: boolean
        • hue: boolean
        • levels: boolean
        • mode7: boolean
        • outline: boolean
        • pixel_shift: boolean
        • tint: boolean
        • watery: boolean
      • allow_jumping_over_it: boolean
      • allow_jumping_through_it: boolean
      • anchor: { x: number; y: number }
        • x: number
        • y: number
      • anim_is_playing: boolean
      • animation: string
      • base_collision_layer: number
      • body_in_map: boolean
      • enable: boolean
      • entangled_by_bush: boolean
      • Optional filter_settings?: FilterSettings
      • frame: string
      • index: number
      • key_name: string
      • position: { x: number; x_px: number; y: number; y_px: number }
        • x: number
        • x_px: number
        • y: number
        • y_px: number
      • psynergy_casted: {}
        • [field_psynergy_key: string]: boolean
      • scale: { x: number; y: number }
        • x: number
        • y: number
      • send_to_back: boolean
      • send_to_front: boolean
      • shadow: { x: number; y: number }
        • x: number
        • y: number
      • shapes_collision_active: boolean
      • state_by_type: { breakable?: { one_level_broken: boolean; two_level_broken: boolean }; pushable?: { docked: boolean }; rollable?: { pillar_is_stuck: boolean }; rope_dock?: { tied: boolean } }
        • Optional breakable?: { one_level_broken: boolean; two_level_broken: boolean }
          • one_level_broken: boolean
          • two_level_broken: boolean
        • Optional pushable?: { docked: boolean }
          • docked: boolean
        • Optional rollable?: { pillar_is_stuck: boolean }
          • pillar_is_stuck: boolean
        • Optional rope_dock?: { tied: boolean }
          • tied: boolean
      • type: { breakable: boolean; is_rope_dock: boolean; rollable: boolean }
        • breakable: boolean
        • is_rope_dock: boolean
        • rollable: boolean
      • visible: boolean

    Returns void

  • initialize_related_events(map: Map): void
  • initialize_rope(map: Map): void
  • insert_event(id: number): void
  • intialize_dock_info(dest_x: number, dest_y: number, starting_dock: boolean, tied: boolean): void
  • Initializes this rope dock properties.

    Parameters

    • dest_x: number

      The destiny dock x tile position.

    • dest_y: number

      The destiny dock y tile position.

    • starting_dock: boolean

      Whether this event is the rope starting dock.

    • tied: boolean

      Whether the rope is tied or not. This variable is only used if it's a starting dock.

    Returns void

  • intialize_swing(force?: boolean): void
  • manage_filter(filter: Filter, set: boolean): void
  • parse_allowed_tiles(allowed_tiles: { collision_layer: number; type: "tile" | "rect"; x?: number; x0?: number; x1?: number; y?: number; y0?: number; y1?: number }[]): void
  • play(animation?: string, action?: string, start?: boolean, frame_rate?: number, loop?: boolean): Animation
  • position_allowed(x: number, y: number): boolean
  • remove_event(id: number): void
  • reset_fragments_pos(): void
  • set_enable(enable: boolean): void
  • set_entangled_by_bush(entangled_by_bush: boolean): void
  • set_rope_fragments(map: Map): void
  • set_shadow(group: Group, options?: { is_world_map?: boolean; key_name?: string; shadow_anchor_x?: number; shadow_anchor_y?: number }): void
  • Initialize the shadow sprite of this IO.

    Parameters

    • group: Group

      the group where the shadow sprite is going to be inserted.

    • Optional options: { is_world_map?: boolean; key_name?: string; shadow_anchor_x?: number; shadow_anchor_y?: number }

      options to be set like anchor values and whether it's a world map.

      • Optional is_world_map?: boolean
      • Optional key_name?: string
      • Optional shadow_anchor_x?: number
      • Optional shadow_anchor_y?: number

    Returns void

  • set_sprites_z_sorting(send_to_back: boolean): void
  • Sets the rope fragments z sorting order by sending them to back or not.

    Parameters

    • send_to_back: boolean

      if true, the rope fragments are sent to back.

    Returns void

  • set_tile_position(pos: { x?: number; y?: number }, update_on_map?: boolean): void
  • set_visible(visible: boolean): void
  • shift_events(event_shift_x: number, event_shift_y: number, manipulate_collision?: { prev_collision_layer: number }): void
  • tie(): void
  • toggle_active(active: boolean): void
  • toggle_collision(enable: boolean): void
  • unset(remove_from_middlelayer_group?: boolean): void
  • update(): void
  • update_shadow(): void

Generated using TypeDoc