Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

Game Lab

function draw() {}
drawSprites()
World.allSprites
World.width
World.height
World.mouseX
World.mouseY
World.frameRate
World.frameCount
playSound()
stopSound()
playSpeech()
keyDown()
keyWentDown()
keyWentUp()
mouseDidMove()
mouseDown()
mouseIsOver()
mouseWentDown()
mouseWentUp()
mousePressedOver()
camera.on()
camera.off()
camera.isActive
camera.mouseX
camera.mouseY
camera.x
camera.y
camera.zoom
comment
World.seconds
Sprites
var sprite = createSprite()
createEdgeSprites()
sprite.setSpeedAndDirection()
sprite.getDirection()
sprite.getSpeed()
sprite.isTouching()
sprite.destroy()
sprite.pointTo()
sprite.bounce()
sprite.bounceOff()
sprite.collide()
sprite.displace()
sprite.overlap()
sprite.setAnimation()
sprite.mirrorX()
sprite.mirrorY()
sprite.nextFrame()
sprite.pause()
sprite.play()
sprite.setCollider()
sprite.setFrame()
sprite.setVelocity()
sprite.height
sprite.width
sprite.getScaledWidth()
sprite.getScaledHeight()
sprite.debug
sprite.depth
sprite.lifetime
sprite.bounciness
sprite.rotateToDirection
sprite.rotation
sprite.rotationSpeed
sprite.scale
sprite.shapeColor
sprite.tint
sprite.velocityX
sprite.velocityY
sprite.visible
sprite.x
sprite.y
comment
sprite.alpha
Groups
var group = createGroup()
group.add()
group.remove()
group.clear()
group.contains()
group.get()
group.isTouching()
group.bounce()
group.bounceOff()
group.collide()
group.displace()
group.overlap()
group.maxDepth()
group.minDepth()
group.destroyEach()
group.pointToEach()
group.setAnimationEach()
group.setColorEach()
group.setTintEach()
group.setColliderEach()
group.setDepthEach()
group.setHeightEach()
group.setLifetimeEach()
group.setMirrorXEach()
group.setMirrorYEach()
group.setRotateToDirectionEach()
group.setRotationEach()
group.setRotationSpeedEach()
group.setScaleEach()
group.setSpeedAndDirectionEach()
group.setVelocityEach()
group.setVelocityXEach()
group.setVelocityYEach()
group.setVisibleEach()
group.setWidthEach()
comment
Drawing
background()
fill()
noFill()
stroke()
strokeWeight()
rgb()
noStroke()
arc()
ellipse()
line()
point()
rect()
regularPolygon()
shape()
text()
textAlign()
textFont()
textSize()
comment
Control
comment
For loop
While loop
If statement
If/else statement
getTime()
setTimeout()
clearTimeout()
setInterval()
clearInterval()
Math
comment
Add Operator
Subtract operator
Multiply operator
Divide operator
Equality operator
Inequality operator
Greater than operator
Greater than or equal operator
Less than operator
Less than or equal operator
And Operator
Or operator
Not operator
randomNumber()
randomNumber min/max
Math.round()
Math.sqrt()
Math.abs()
Math.pow()
Math.max()
Math.min()
Math.random()
Modulo operator
Variables
comment
Assign x
console.log()
Declare and assign an array to a variable
Declare and assign an array to a variable
Declare and assign a string to a variable
Declare and assign a value to a variable
Declare a variable
strincludes()
str.indexOf()
strlength
list.length
str.substring()
str.toLowerCase()
str.toUpperCase()
Functions
Define a function
Define a function with parameters
Call a function
Call a function with parameters
return
Comment

You might also like