Protected _activeProtected _body_Protected _current_Protected _current_Protected _current_The direction that the char is moving.
Protected _current_Protected _emoticon_Protected _extra_Protected _extra_Protected _force_Protected _ice_The direction of the ice sliding movement that can be different of char direction.
Protected _push_Protected _required_The direction determined by the input.
Protected _shapes_Protected _sprite_Protected _temp_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
If true, the next battle encounter will be avoided, then this var is reset to false.
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 gamePrivate general_This hero general counter. Used in recover PP, djinn recover and poison damage.
Whether this char is under an ice sliding ground.
Whether this char is idle during climbing state.
If true, animation play will be ignored.
Whether this char is jumping.
Protected look_Whether this char is busy by any misc. reason.
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.
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.
Whether the char is idle/stopped due to collision.
Protected storage_Optional action?: stringOptional active?: stringOptional animation?: stringOptional position?: 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 GENERAL_The increment value for hero general counter when dashing. Used in recover PP, djinn recover and poison damage.
Static Private Readonly GENERAL_The increment value for hero general counter when walking. Used in recover PP, djinn recover and poison damage.
Static Private Readonly GENERAL_The counter limit value. Used in recover PP, djinn recover and poison damage.
Static Private Readonly ROTATION_This variable can convert from pressed keys to the corresponding in-game rotation.
Static Private Readonly SPEEDSSpeed factor values for each standard direction.
Whether this char is active.
An object containing which filters are active in this char.
This char body if available.
This char collision body radius.
Gets the collision layer that the hero 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.
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.
Returns whether it's an IO. Always returns false.
Whether the char is npc or hero.
The char key.
The Phaser.Filter that controls the color levels of the texture of this char sprite.
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.
The SpriteBase object of this char.
This char pre-caculated speed. It might change due to collision.
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 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.
Private check_Protected choose_Protected choose_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 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.
Checks 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.
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_Sets the normalized speed factors of the hero.
if true, it will calculate the factors only when not in a tile event.
Optional desired_direction: directionsa desired direction for the hero to go. If not passed, will pick the arrow inputs direction.
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.
Protected update_
This class is responsible to control the hero that is controlled by the game player in the maps.