From ea9ef830fb97dc422e599120e5a03e4bf8998f18 Mon Sep 17 00:00:00 2001 From: kvetzal Date: Mon, 21 Apr 2014 08:00:27 -0400 Subject: [PATCH] spawn point fix --- lajik/lajik.pde | 311 +++++++++++++++++++----------------------------- 1 file changed, 123 insertions(+), 188 deletions(-) diff --git a/lajik/lajik.pde b/lajik/lajik.pde index 60773dc..104db1f 100644 --- a/lajik/lajik.pde +++ b/lajik/lajik.pde @@ -220,204 +220,21 @@ void gameSetup() { myLevel = new Level(); - float units = width/30; - - world.setEdges(-width/2, -height, units*159, units*60); - //InitPlayerModel - playerModel = new FBox(units, units); + playerModel = new FBox(width/30, width/30); - //Setup playermodel playerModel.setBullet(true); playerModel.setNoStroke(); playerModel.setFill(255, 255, 255); - playerModel.setPosition(width/2, height/2); + playerModel.setPosition(0, 0); playerModel.setFriction(0.01); playerModel.setDensity(2.0); playerModel.setRestitution(0.0); - createGround(); - - //starter platform - /*groundTest = new FBox(width, 50); - groundTest.setFillColor(#303030); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(width/2, height-50); - - myLevel.static_objects.add(groundTest); - - //starter platform bottom and sides. - groundTest = new FBox(width+2, 50+1); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(width/2, height-50+2); - groundTest.setFill(0, 0, 0, 0); - groundTest.setNoStroke(); - myLevel.static_objects_walls.add(groundTest); - - groundTest = new FBox(3072, 25); - groundTest.setFillColor(#303030); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(512, 1501); - - myLevel.static_objects.add(groundTest);*/ - - /*groundTest = new FBox(30, 500); - groundTest.setFillColor(#303030); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(15, 993); - - myLevel.static_objects_walls.add(groundTest);*/ - - //create the steps - - /*for (int i = 0;i < 4;i++) { - groundTest = new FBox(100, 10); - groundTest.setFillColor(#303030); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(-150-205*i, 900+185*i); - - myLevel.static_objects.add(groundTest); - - groundTest = new FBox(104, 11); - groundTest.setFriction(0.1); - groundTest.setStatic(true); - groundTest.setPosition(-150-205*i, 900+185*i+2); - //groundTest.setStroke(255,0,0); - groundTest.setFill(0, 0, 0, 0); - groundTest.setNoStroke(); - myLevel.static_objects_walls.add(groundTest); - }*/ - - for (int i=0;i