Constructors
- Animation
- IsoCharacter
- Path
- PhysicsObject
- SceneObject
- SceneObjectGroup
- Sprite
- TextSprite
- TilemapCharacter
- wade
- wade.drawFunctions
- wade.iso
- wade.physics
- wade.tilemap
- wade.vec2
IsoCharacter
Constructor Summary
IsoCharacter
This is a behavior to be used by characters in the isometric world of wade.iso. It handles movement, pathfinding, movement queues, and more.
Fields Summary
IsoCharacter.maxStepHeight
The maximum height difference between two tiles that will allow this character to move from one tile to the next. Default is 20.
IsoCharacter.movementSpeed
The movement speed of the character (in world units per second). Note that changing this won't affect any movement that is currently in progress, only future movements. Default is 160.
IsoCharacter.name
The name of the behavior. This is set to 'IsoCharacter'.
IsoCharacter.variationProbability
How likely it is that an idle animation (if present) will be played when the character is idle.
Functions Summary
IsoCharacter.clearDestinations () Remove any destinations that were added with setDestination().
IsoCharacter.getNextDestination () Get the next destination.
IsoCharacter.goToObject (object)
Move towards an object. If the object has an interactionOffset field set in its object data, the character will try to go there. If that is not possible (or no interaction offset is set) the character will try to move to the object's tile. If that is not possible (because the object has a collision map), it will try to move to any tile next to the object.
IsoCharacter.setDestination (gridCoords)
Set a destination (a tile to move to) for the character.
IsoCharacter.setDirection (direction)
Set a direction to face. This will change the idle animation that is currently playing and won't have any effect if the character is moving.
IsoCharacter.setMovementType (type)
Set a movement type for this character.
IsoCharacter.startWandering (probability, stepDistance, targetObject)
Start moving around in random directions.
IsoCharacter.stopWandering () Stop moving around in random directions.
Constructor Details
IsoCharacter
This is a behavior to be used by characters in the isometric world of wade.iso. It handles movement, pathfinding, movement queues, and more.
Fields Details
IsoCharacter.maxStepHeight
The maximum height difference between two tiles that will allow this character to move from one tile to the next. Default is 20.
IsoCharacter.name
The name of the behavior. This is set to 'IsoCharacter'.
IsoCharacter.variationProbability
How likely it is that an idle animation (if present) will be played when the character is idle.
Function Details
IsoCharacter.clearDestinations () Remove any destinations that were added with setDestination().
IsoCharacter.getNextDestination () Get the next destination.
Returns Object: An object with x and z fields representing the next destination, or null if there are no destinations in the queue.
When the character reaches the object, an onObjectReached event is fired.
IsoCharacter.setDestination (gridCoords)
Set a destination (a tile to move to) for the character.
When the character reaches its destination, an onDestinationReached event is fired.
IsoCharacter.setMovementType (type)
Set a movement type for this character.
IsoCharacter.startWandering (probability, stepDistance, targetObject) Start moving around in random directions.
IsoCharacter.stopWandering () Stop moving around in random directions.