Constructor
new SimpleIsoCharacter(source, canvasObject, fromRect, x, y, z, width, height, depth, scene, aWidth, aHeight)
Parameters:
Name | Type | Description |
---|---|---|
source |
Image | |
canvasObject |
CanvasObject | |
fromRect |
Rectangle | |
x |
Number | |
y |
Number | |
z |
Number | |
width |
Number | |
height |
Number | |
depth |
Number | |
scene |
SimpleIsoScene | |
aWidth |
Number | animation width |
aHeight |
Number | animation height |
- See:
Members
animation :SimpleIsoAnimation
Type:
constructor
scene :SimpleIsoScene
Type:
traveler :Traveler
Type:
Methods
animateInScene(speed)
changes animation.currentAnimation to directionFacing() and calls animate
Parameters:
Name | Type | Description |
---|---|---|
speed |
Number | optional speed of animation |
matchTraveler(all, sx, sy)
Set the velocity to the same as its traveler, and potentially x and y.
Parameters:
Name | Type | Description |
---|---|---|
all |
Boolean | Match both x and y |
sx |
Boolean | Match just x |
sy |
Boolean | Match just y |
travelerMatchThis(all)
Set the velocity of the traveler to this, and if all is true also x and y and _pos.
Parameters:
Name | Type | Description |
---|---|---|
all |
Boolean | if true will update x and y and _pos also. |