//Import all Phys2D libraries import pphys2d.bodies.*; import pphys2d.joints.*; import pphys2d.shapes.*; import pphys2d.phys2d.raw.collide.*; import pphys2d.phys2d.raw.strategies.*; import pphys2d.phys2d.raw.forcesource.*; import pphys2d.phys2d.util.*; import pphys2d.phys2d.raw.shapes.*; import pphys2d.*; int frame = 0; int numFrames = 50; PImage[] monsterAnimation = new PImage[numFrames*2]; PFont fontVerdana10; PPWorld world = new PPWorld(); PPBox outlineMonster; boolean[] keyIsPressed = new boolean[512]; int goingRight = 0; void setup () { frameRate(30); size(800,400); background(0); fontVerdana10 = loadFont("Verdana-10.vlw"); textFont(fontVerdana10); world.setGravity(0, 0); //Add a box to the world outlineMonster = new PPBox(150, 313); outlineMonster.setPosition(width/2,200); outlineMonster.setStrokeWidth(0); outlineMonster.setRotatable(false); world.add(outlineMonster); world.setEdges(this, new Color (0)); world.setEdgesRestitution(300f); //world.setDamping(0.2f); //Load images for (int i = 0; i