def setup(): global boxButton, circleButton, polyButton, world size(400, 400) smooth() Fisica.init(this) world = FWorld() world.setEdges() world.remove(world.left) world.remove(world.right) world.remove(world.top) boxButton = FBox(40, 40) boxButton.setPosition(width/4, 100) boxButton.setStatic(True) boxButton.setFillColor(buttonColor) boxButton.setNoStroke() world.add(boxButton) circleButton = FCircle(40) circleButton.setPosition(2*width/4, 100) circleButton.setStatic(True) circleButton.setFillColor(buttonColor) circleButton.setNoStroke() world.add(circleButton) polyButton = FPoly() polyButton.vertex(20, 20) polyButton.vertex(-20, 20) polyButton.vertex(0, -20) polyButton.setPosition(3*width/4, 100) polyButton.setStatic(True) polyButton.setFillColor(buttonColor) polyButton.setNoStroke() world.add(polyButton)
def setup(): global world, pala size(400, 400) smooth() Fisica.init(this) world = FWorld() pala = FBox(50, 20) pala.setPosition(width / 2, height - 40) pala.setStatic(True) pala.setFill(0) pala.setRestitution(0) world.add(pala)
def setup(): global world, pala size(400, 400) smooth() Fisica.init(this) world = FWorld() pala = FBox(50, 20) pala.setPosition(width/2, height - 40) pala.setStatic(True) pala.setFill(0) pala.setRestitution(0) world.add(pala)
def setup(): global world, obstacle size(400, 400) smooth() Fisica.init(this) world = FWorld() obstacle = FBox(150,150) obstacle.setRotation(PI/4) obstacle.setPosition(width/2, height/2) obstacle.setStatic(True) obstacle.setFill(0) obstacle.setRestitution(0) world.add(obstacle)
def setup(): global world, obstacle size(400, 400) smooth() Fisica.init(this) world = FWorld() obstacle = FBox(150, 150) obstacle.setRotation(PI / 4) obstacle.setPosition(width / 2, height / 2) obstacle.setStatic(True) obstacle.setFill(0) obstacle.setRestitution(0) world.add(obstacle)