I | |
init | |
isActive, gamvas. | |
isFullScreen, gamvas | |
isPressed | |
isReady, gamvas. | |
isSet, gamvas | |
L | |
leave | |
length, gamvas. | |
loading, gamvas. | |
loop, gamvas. | |
M | |
move | |
mute, gamvas. | |
N | |
normalized, gamvas. | |
O | |
onCollision, gamvas. | |
onCollisionEnter, gamvas. | |
onCollisionLeave, gamvas. | |
onKeyDown | |
onKeyUp | |
onMouseDown | |
onMouseMove | |
onMouseUp | |
onParticleEnd, gamvas. | |
onTouchDown, gamvas. | |
onTouchMove, gamvas. | |
onTouchUp, gamvas. | |
P | |
play, gamvas. | |
postDraw | |
preDraw | |
Q | |
quickDistance, gamvas. | |
quickLength, gamvas. | |
R | |
registerInputEvents, gamvas. | |
removeActor, gamvas. | |
reset, gamvas. | |
resetForces, gamvas. | |
resetWorld, gamvas. | |
resume, gamvas. | |
rotate |
Description
init: function()
Gets called once on state initialization.
init: function()
The init function is called only once per state to initialize it.
init: function()
Check if the actor is active
isActive: function()
Test if we are currently running in real fullscreen mode
isFullScreen: function()
Check if a key is pressed
isPressed: function( k )
Check if a mouse button is pressed
isPressed: function( k )
Test if the sound is ready to play
gamvas.Sound.prototype.isReady = function()
Tests if a variable is set
isSet: function( v )
Gets called when the state is left.
leave: function()
The enter function is called when the state is left.
leave: function()
Return the length of the vector in pixels.
gamvas.Vector2D.prototype.length = function()
Overwrite for a custom loading screen
loading: function( t )
Play the sound looping (e.g.
gamvas.Sound.prototype.loop = function()
Move the actor
move: function( x, y )
Move the animation
move: function( x, y )
Move the camera, relative to its current position.
gamvas.Camera.prototype.move = function( x, y )
Move the image
this.move = function( x, y )
Mute the sound
gamvas.Sound.prototype.mute = function()
Returns the normalized vector of a vector.
gamvas.Vector2D.prototype.normalized = function()
The actor starts a collision with another actor
onCollision: function( a, ni, ti, c )
The actor starts a collision with another actor
onCollisionEnter: function( a, c )
The actor leaves a collision with another actor
onCollisionLeave: function( a, c )
A key on the keyboard was pressed
onKeyDown: function( keyCode, character, ev )
A key on the keyboard was pressed
onKeyDown: function( keyCode, character, ev )
A key on the keyboard was released
onKeyUp: function( keyCode, character, ev )
A key on the keyboard was released
onKeyUp: function( keyCode, character, ev )
A mouse button was pressed
onMouseDown: function( button, x, y, ev )
A mouse button was pressed
onMouseDown: function( button, x, y, ev )
The mouse was moved
onMouseMove: function( x, y, ev )
The mouse was moved
onMouseMove: function( x, y, ev )
A mouse button was released
onMouseUp: function( button, x, y, ev )
A mouse button was released
onMouseUp: function( button, x, y, ev )
Overwrite this function to do something everytime a particle is removed
onParticleEnd: function( pos, rot, scale, vel )
A finger starts touching the display
onTouchDown: function( id, x, y, ev )
A finger is sliding over the surface
onTouchMove: function( id, x, y, ev )
A finger stopped touching the display
onTouchUp: function( id, x, y, ev )
Play the sound once, restarts the sound automatically
gamvas.Sound.prototype.play = function()
Gets called after camera handling.
postDraw: function( t )
Gets called after camera handling.
postDraw: function( t )
This function is called after camera is applied.
postDraw: function( t )
Gets called after screen clear and before camera handling.
preDraw: function( t )
Gets called after screen clear and before camera handling.
preDraw: function( t )
This function is called before camera is applied.
preDraw: function( t )
Returns a comparable distance between the current vector and vector v
gamvas.Vector2D.prototype.quickDistance = function( v )
Returns the non sqrt() length of the vector, which is faster to calculate as it’s real length.
gamvas.Vector2D.prototype.quickLength = function()
Send keyboard/mouse events to gamvas.Actor onKeyDown and similar functions
registerInputEvents: function( act )
Add a gamvas.Actor to the state.
removeActor: function( act )
Reset the particle emitter
reset: function( kill )
Resets all physical forces on the actor
resetForces: function( x, y, r )
Resets the physics world
resetWorld: function( gravx, gravy, slp, listener )
Resumes a stopped sound, without rewinding it
gamvas.Sound.prototype.resume = function()
Rotate the actor
rotate: function( r )
Rotate the animation
rotate: function( r )
Rotate the camera for r radians
gamvas.Camera.prototype.rotate = function( r )
Rotate the image
this.rotate = function( r )
Returns a new vector with the current vector rotated a certain angle.
gamvas.Vector2D.prototype.rotate = function( r )