The direction that the char is moving.
The direction of the ice sliding movement that can be different of char direction.
The direction determined by the input.
When changing directions, the char smoothly changes to the target direction. This var holds the intermediate directions.
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.
Whether this char is casting psynergy.
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.
Whether this char is dashing.
Whether 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.
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.
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.
Whether this char is teleporting by the teleport TileEvent.
Whether thic char is trying to push an Interactable Object.
Whether this char is walking over a rope.
The increment value for hero general counter when dashing. Used in recover PP, djinn recover and poison damage.
The increment value for hero general counter when walking. Used in recover PP, djinn recover and poison damage.
The counter limit value. Used in recover PP, djinn recover and poison damage.
This variable can convert from pressed keys to the corresponding in-game rotation.
Speed 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.
The Footsteps object (in the case this char is letting footprints in the ground).
This char speed according to the collision slope.
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.
Apply the calculated speed values.
Blinks this char by tintint and untinting it or outlining it.
how many times this char will blink.
the time interval between each blink.
some options.
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.
if true, will keep the color filter on blink finish.
If true, the char will be outlined instead of tinted. Default is false.
If 'outline_blink' is true, whether the char will be transparent or not when outlined. Default is true.
Calculates this char speed based on its states like walk, dash etc.
Changes this char action.
the action to be changed.
if true, plays the given action animation.
Checks which hero controls are being pressed. Like arrows and dash buttons.
Checks whether there's a necessity to change hero direction due to any custom circumstances.
Checks if this char is colliding with any interactable object and fire any possible interaction with it.
Checks if this char will quit sand mode by colliding with a tile that has quit_sand
property true.
p2 contact equation array.
returns true if it exited sand mode.
Chooses this char action based on its states like climbing, walk, dash etc.
if true, will check whether the game has any event running.
Sets this char direction from its speed values.
Initializes and configs the hero collision body.
the hero collision body radius.
Creates an cropping mask for the lower half of the char when it's in a tile that has the half_crop property set to true.
Destroys the emoticon of this char if there's one.
Makes this char to face a given direction.
the direction to be faced.
time interval between transition directions.
Make the char to fall to a given destination.
fall options object.
The destination collision layer index.
Whether the char will perform a ground hit animation.
Whether an exclamation emoticon will appear over the char before falling.
The char will splash sweat drops before falling.
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.
If true, the char will diminish instead of fall before teleport.
The origin position that the char will be just after the teleport.
The x tile position.
The y tile position.
If true, the char sprite will be brought to the top on z-index while falling.
Callback to be called before teleport begin.
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.
Callback to be called after hitting the ground.
Gets the hero battle encounter factor that depends on the type of the map (if it's world map or not) and whether it's dashing or not.
the encounter factor.
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.
Plays an animation for the char hitting the ground when falling.
calback to be called on animation end.
Returns whether this char is in action;
if true, climbing won't be considered.
Returns whether this char is in action.
Checks whether this char is in movement.
if true, will check only dash and walk.
returns true if in movement.
Increments the char extra speed value.
the speed variation.
Increments the char forced extra speed value.
the x and/or y speed variation object.
Initializes the hero.
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.
Whether the char will bounce on jump finish. Only for vertical jumps.
If this object is set, the char will perform a jump towards a given direction.
The 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.
The distance multiplier that will be applied to the final jump distance.
The x tile position destination. If position in px is defined, this one won't be used.
The y tile position destination. If position in px is defined, this one won't be used.
The x position destination in px. This position has preference over tile position.
The y position destination in px. This position has preference over tile position.
If true, char jump animation won't be played.
The duration of the jump in ms.
The direction that the char is going to be while jumping.
The height of the jump in px. This option is not valid if it's a diagonal direction jumping.
Whether the char shadow will remain hidden after jump.
The sound effect to play while jumping.
A time to wait on jump finish in ms.
Sets or unsets a Phaser.Filter in this char.
the filter you want to set.
whether it's to set or unset the filter.
Plays an animation of this char.
the action that this char is going to doing.
an 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.
a custom frame rate value.
whether the animation will be looping.
whether the animation will reset before start.
whether the animation will be played on reverse sense.
Returns the resulting Phaser.Animation object.
Plays the current action of this char.
if true, will check whether the game has any event running.
Removes a callback added by add_animation_callback
method.
the callback unique key.
returns true if the callback was removed successfully.
Reset anchor values to default.
define whether it is y or x anchor property.
Resets the scale of this char to default values.
Changes the collision layer of this char.
the collision layer index.
Changes the char current direction to the given direction.
the 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.
the action of the target frame.
Sets or unsets the hue filter in this char.
whether you want to activate the hue filter or not.
the hue angle.
Changes the ice slide direction.
the direction to be set.
Activate or deactivate target looking.
Whether you want to activate or deactivate.
The 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.
some options.
The blue color component of the outline. 0 to 1. Default 1.
The green color component of the outline. 0 to 1. Default 1.
If this property is true, the char will be transparent excepting the outline. Default false.
The red color component of the outline. 0 to 1. Default 1.
Sets this char position.
the x/y positions in px.
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.
optionally 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.
options to be set like anchor values and whether it's a world map.
Sets some speed values.
the x speed value.
the y speed value.
if true, the given speed will be applied.
Sets the normalized speed factors of the hero.
if true, it will calculate the factors only when not in a tile event.
a 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 x anchor value of the sprite.
optional y anchor value of the sprite.
optional x scale value of the sprite.
optional y scale value of the sprite.
Sets 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.
the x speed value.
the y speed value.
Changes the direction that the char is trying to push.
the direction to be set.
Sets the hero visibility.
whether to be visible or not.
Shakes this char by changing its scale.
Max scale multiplier
Duration of each shake
How many times the char should shake
If true, the char will shake horizontally
Shows an emoticon above this char.
The emoticon key name.
Some custom options.
The duration that this emoticon is going to be shown in ms. -1 for forever.
A custom location for the emoticon.
Sound effect key to be played.
returns the emoticon sprite.
Splashes sweat drops from this char. The drops will follow this char pos.
how many times the sweat drops will splash.
Stops the current animation of this char.
Resets the current animation to the first frame.
Stops the char movement.
if true, sets idle animation.
Activates or deactivates the hero.
whether you want to activate it or not.
Sets whether the collision body of this char is enable or not.
if true, activates the collision.
Unsets the push timer.
The main hero update function.
Updates the general counter value. General counter is used in recover PP, djinn recover and poison damage.
The half cropping mask update function.
if true, forces the mask appliance.
Updates the char movement.
if true, ignores the collision impact on movement
Update function when the game is in event state.
The update function for the shadow sprite.
Updates sweat drops position.
Updates the tile positions.
Generated using TypeDoc
This class is responsible to control the hero that is controlled by the game player in the maps.