Reference
- Body Classes
-
Body Functions
- (PPBox)getHeight()
- (PPBox)getWidth()
- (PPBox)setSize()
- (PPCircle)getSize()
- (PPCircle)setSize()
- addExcludedBody()
- addForce()
- adjustAngularVelocity()
- adjustVelocity()
- applyMatrix()
- attachImage()
- dettachImage()
- getAngularVelocity()
- getImageAlpha()
- getRotation()
- getVelocityX()
- getVelocityY()
- getX()
- getY()
- isResting()
- isStatic()
- isTouchingBody()
- resetForces()
- setAngularVelocity()
- setDamping()
- setDrawable()
- setFillColor()
- setFriction()
- setGravityEffected()
- setImageAlpha()
- setMass()
- setPosition()
- setRestitution()
- setRotatable()
- setRotation()
- setRotDamping()
- setStaticBody()
- setStrokeColor()
- setStrokeWidth()
- setVelocity()
- World Classes
- World Fucntions
setEdges()
Description
Use screen edge as bodies to create limits for the world. When used, bodies will bounce when they will hit any screen edge.
Exemples
PPWorld world = new PPWorld();
world.setEdges(this, new Color (26, 145, 38, 1));
Syntax
world.setEdges(theApplet, color);
Parameters
theApplet ->
PApplet : the Processing applet on wich apply matrix transformation. Usually, use "this" for this parameter.
color ->
Color : a java Color(red, green, blue, alpha) object that define the color of the edges.