Protected _activePrivate _affected_Private _after_Private _allow_Private _allow_Private _angle_Private _avatarPrivate _back_Private _base_Private _base_Protected _body_Protected _current_Protected _current_Protected _current_The direction that the char is moving.
Protected _current_Private _custom_Private _custom_Private _custom_Private _custom_Optional animation?: { Optional reset_Optional stop_Optional look_Optional position?: { Optional dashing?: booleanOptional extra_Optional incremental?: booleanOptional is_Optional wait?: numberProtected _emoticon_Private _eventsProtected _extra_Protected _extra_Protected _force_Private _healer_Protected _ice_The direction of the ice sliding movement that can be different of char direction.
Private _ignore_Private _ignore_Private _initial_Private _initial_Private _inn_Private _interaction_Private _labelPrivate _loop_Private _map_Private _max_Private _messagePrivate _next_Private _npc_Protected _push_Protected _required_The direction determined by the input.
Protected _shapes_Private _shop_Private _snapshot_Optional filter_Protected _sprite_Private _step_Private _step_Private _step_Private _step_Private _steppingPrivate _talk_Protected _temp_Private _thought_Protected _tile_Protected _tile_Protected _transition_When changing directions, the char smoothly changes to the target direction. This var holds the intermediate directions.
Protected _trying_The direction that the char is trying to push an interactable object
Private _voice_Private _wait_Private anchor_Private anchor_The function used to stop this char casting aura.
Optional reset_casting_psy_flag: booleanOptional reset_map_tint: booleanWhether this char is casting psynergy.
Protected climb_Whether this char is climbing.
Whether this char is climbing a rope.
A mask that contains in which directions the hero is colliding. Example:
Whether the char is prone to have it's texture halved when going through forests.
Protected dash_Whether this char is dashing.
Protected dataWhether the char will let footprints in the ground.
Forces this char to stop while in game event.
Whether the char had its direction changed due to side collision.
Forces char to assume idle action if it's forced to stop while in a game event.
Protected gameWhether this char is under an ice sliding ground.
Whether this char is idle during climbing state.
If true, animation play will be ignored.
Private initially_Whether this char is jumping.
Protected look_Whether this char is busy by any misc. reason.
If true, this NPC will move freely while a game event is happening.
The type of movement of this NPC. Idle, random walk, or custom.
Private no_Whether this char is under custom psynergy effect.
Whether this char is under Reveal psynergy effect.
If true, it will assume that this char is walking over a stair. This will impact this char facing direction.
Whether this char is pushing an Interactable Object.
Whether this char is melted in sand.
Private scale_Private scale_The shadow sprite object.
Whether the shadow is following or not this char.
Whether this char is cliff sliding.
Whether this char is sliding/moving over an ice ground.
The char main sprite object.
Private sprite_Whether the char is idle/stopped due to collision.
Protected storage_Optional action?: stringOptional active?: stringOptional affected_Optional animation?: stringOptional base_Optional interaction_Optional move_Optional movement_Optional position?: stringOptional visible?: stringWhether this char is teleporting by the teleport TileEvent.
Whether thic char is trying to push an Interactable Object.
Protected walk_Whether this char is walking over a rope.
Static Private Readonly MAX_Static Private Readonly NPC_Static Private Readonly STOP_Whether this char is active.
An object containing which filters are active in this char.
Whether this NPC is affected by Reveal psynergy or not.
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.
If true, the hero will be allowed to interact with this NPC even if it's inactive.
If true, the hero will only be able to interact with this NPC when he's on the front of it.
The avatar key of this NPC.
The message to be displayed if interacting from the back.
The collision layer that this NPC is.
This char body if available.
This char collision body radius.
The collision layer that this NPC is.
The Phaser.Filter that controls the blend of colors of the texture of this char sprite.
The Phaser.Filter that controls the colors of the texture of this char sprite.
The char current action.
The char current animation.
The current active direction of this char according to it movement.
This char current speed normalized vector. This pretty much indicates the char direction.
The extra char speed that might be applied to current speed.
The extra char speed that might be applied to current speed even if it's idle.
The Phaser.Filter that sets flame colors into char sprite.
This char speed according to the collision slope.
The Phaser.Filter that activates a glow in this char sprite.
The Phaser.Filter that controls the saturation of the texture of this char sprite.
If it's a Healer NPC, returns the key of the healer establishment that it owns.
This char height.
The Phaser.Filter that controls the hue of the texture of this char sprite.
The direction in which this char is sliding in the ice. It's not necessarily the direction that this char is facing.
If true, this NPC won't have collision body.
If true, this NPC scale won't change when it's in World Map.
If it's a Inn NPC, returns the key of the inn that it owns.
The type of interaction that this NPC provides when interacting with the hero.
Returns whether it's an IO. Always returns false.
Whether the char is npc or hero.
The char key.
The unique label that identifies this NPC.
The Phaser.Filter that controls the color levels of the texture of this char sprite.
The map unique index of this NPC.
The default interaction message of this NPC.
The Phaser.Filter that activates an outline in this char sprite.
The Phaser.Filter that ashifts the texture of this char sprite.
The Phaser.TimerEvent used in the Interactable Object push process.
The directing that's being requested to this char to go.
Whether the shapes of this char body are active (colliding) or not.
If it's a shop NPC, returns the key of the shop that it owns.
Returns the snapshot info of this NPC when the game is restored.
Optional filter_The SpriteBase object of this char.
The interaction range factor. Determines how far the hero need to be at least to start an interaction.
This char pre-caculated speed. It might change due to collision.
The default interaction message by using Mind Read of this NPC.
Gets the tile pos object for this char.
The current x tile position.
The current y tile position.
The Phaser.Filter that tints the texture of this char sprite.
When changing direction, the char doesn't face immediately the requested direction. This property holds the transion directions till it reaches the requested direction.
The direction that this char is trying to push an Interactable Object.
The voicec sound key of this NPC.
The Phaser.Filter that sets water colors into char sprite.
This char width.
Gets the current x position in px.
Sets the current x position in px.
Gets the current y position in px.
Sets the current y position in px.
Adds a callback for this char that will be called when this char animation changes.
the callback that will be called.
returns the key to track this callback, so you can identify it later to remove.
Protected apply_Blinks this char by tintint and untinting it or outlining it.
how many times this char will blink.
the time interval between each blink.
Optional options: { some options.
Optional color?: { The color to tint/outline the char.
The blue color component to tint. 0 to 1. Default 1.
The green color component to tint. 0 to 1. Default 1.
The red color component to tint. 0 to 1. Default 1.
Optional keep_if true, will keep the color filter on blink finish.
Optional outline_If true, the char will be outlined instead of tinted. Default is false.
Optional transparent_If 'outline_blink' is true, whether the char will be transparent or not when outlined. Default is true.
Protected calculate_Changes this char action.
the action to be changed.
if true, plays the given action animation.
Changes the collision layer of this NPC.
the desitination collision layer index.
whether you want this modification to propagate to map structure.
Protected choose_Protected choose_Private execute_Private execute_Make the char to fall to a given destination.
fall options object.
Optional 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.
Gets the storage key name associated to a given NPC property.
the property name that you want to get the storage key.
returns the storage key name for the given property.
Gets the update callback that need to be fired under a loop in order to move this char to a specific position.
the desitiona position object.
the callback that will be called when this char reaches the position.
the minimal distance to be regarded to when check whether this char is close enough to the destination.
return the update callback to keep this char moving and checking whether it should stop.
Initializes this NPC.
the map that's being mounted.
Optional snapshot_info: { the snapshot data of this npc.
Optional filter_Optional custom_pos: { an initial custom position for this npc in px.
Optional x?: numberOptional y?: numberChecks whether this char is interacting with another one from the back.
the char that this char is interacting with.
returns whether this char is interacting from the back or not.
Returns if this char is enough close to a target char.
The target char.
If it's close enough, returns the distance, else returns null.
Makes this char to jump vertically or to a specific destination.
Optional bounce?: booleanWhether the char will bounce on jump finish. Only for vertical jumps.
Optional dest?: { If this object is set, the char will perform a jump towards a given direction.
Optional distance?: numberThe jump distance that this char will perform. If not given, this char will jump into the center of the destination. This option is not valid if it's a diagonal direction jumping.
Optional distance_The distance multiplier that will be applied to the final jump distance.
Optional tile_The x tile position destination. If position in px is defined, this one won't be used.
Optional tile_The y tile position destination. If position in px is defined, this one won't be used.
Optional x?: numberThe x position destination in px. This position has preference over tile position.
Optional y?: numberThe y position destination in px. This position has preference over tile position.
Optional dont_If true, char jump animation won't be played.
Optional duration?: numberThe duration of the jump in ms.
Optional jump_The direction that the char is going to be while jumping.
Optional jump_The height of the jump in px. This option is not valid if it's a diagonal direction jumping.
Optional keep_Whether the char shadow will remain hidden after jump.
Optional sfx_The sound effect to play while jumping.
Optional time_A time to wait on jump finish in ms.
Plays an animation of this char.
Optional action: stringthe action that this char is going to doing.
Optional animation: stringan specific animation of the given action that this char is going to be executing.
whether you want the animation to start. Otherwise it will be stopped.
Optional frame_rate: numbera custom frame rate value.
Optional loop: booleanwhether the animation will be looping.
Optional reset_before_start: booleanwhether the animation will reset before start.
Optional reversed: booleanwhether the animation will be played on reverse sense.
Returns the resulting Phaser.Animation object.
Changes the char current direction to the given direction.
Optional direction: directionsthe direction to change.
plays this new direction.
also change the transition direction.
Private set_Set a specific frame for this char.
the animation or direction of the target frame.
the frame index.
Optional action: stringthe action of the target frame.
Changes the ice slide direction.
the direction to be set.
Activate or deactivate target looking.
Whether you want to activate or deactivate.
Optional target: ControllableCharThe target char whether this char is going keep looking.
Sets or unsets an outline in this char. You can also use this function to update options. Otherwise, use ControllableChar.outline_filter directly.
whether you want to activate the outline or not.
Optional options: { some options.
Optional b?: numberThe blue color component of the outline. 0 to 1. Default 1.
Optional g?: numberThe green color component of the outline. 0 to 1. Default 1.
Optional keep_If this property is true, the char will be transparent excepting the outline. Default false.
Optional r?: numberThe red color component of the outline. 0 to 1. Default 1.
Sets the push timer for this char. This timer is used to start the object pushing. The char must wait for this timer before pushing.
the timer callback.
the initial delay.
Activates or deactivates this char rotation on z-axis.
if true, activates the rotation.
frame change rate interval in ms. -1 to change every frame.
Optional frame_index: numberoptionally specifies a frame index to be in when rotating.
Initialize the shadow sprite of this char.
the group where the shadow sprite is going to be inserted.
Optional options: { options to be set like anchor values and whether it's a world map.
Optional is_Optional key_Optional shadow_Optional shadow_Private set_Sets the x-y speed values that this NPC is going to be using to move. It's important to have NPC._angle_direction set for correct checking.
Returns true if the speed values were set. Going towards a collision direction is not acceptable, then returns false.
Initializes the char sprite.
the group that this is char is going to be inserted.
the frames and animations information of this char.
the collision layer that this char is.
the map where this char is going to be in.
Optional anchor_x: numberoptional x anchor value of the sprite.
Optional anchor_y: numberoptional y anchor value of the sprite.
Optional scale_x: numberoptional x scale value of the sprite.
Optional scale_y: numberoptional y scale value of the sprite.
Optional initial_x_px: numberOptional initial_y_px: numberSets some temporary speed values. These temporary values are set before collision analysis and may suffer changes on it. After collision analysis, they are indeed applied to actual speed values.
Optional x_speed: numberthe x speed value.
Optional y_speed: numberthe y speed value.
Changes the direction that the char is trying to push.
the direction to be set.
Shakes this char by changing its scale.
Optional options: { Optional max_Max scale multiplier
Optional repeat_Duration of each shake
Optional repeats_How many times the char should shake
Optional side_If true, the char will shake horizontally
Shows an emoticon above this char.
The emoticon key name.
Optional options: { Some custom options.
Optional duration?: numberThe duration that this emoticon is going to be shown in ms. -1 for forever.
Optional location?: { A custom location for the emoticon.
Optional x?: numberOptional y?: numberOptional sound_Sound effect key to be played.
returns the emoticon sprite.
Private update_Protected update_
The NPC class.