Josh Engebretson 11 years ago
parent
commit
56b9397deb

+ 5 - 5
PhysicsPlatformer/Resources/Components/Avatar.js

@@ -20,6 +20,7 @@ light.radius = 20;
 light.castShadows = true;
 light.softShadows = true;
 light.numRays = 256;
+light.backtrace = true;
 self.light = light;
 
 lightGroup.addLight(light);
@@ -173,13 +174,12 @@ function handleInput(timeStep) {
 
     if (zoomOut)
         camera.zoom -= timeStep;
-
-    /*
+        
+    
     if (camera.zoom > 1.5)
         camera.zoom = 1.5;
-    if (camera.zoom < .75)
-        camera.zoom = .75;
-     */
+    if (camera.zoom < .45)
+        camera.zoom = .45;
 
     if (left && vel[0] > -MAX_VELOCITY) {
         body.applyLinearImpulse([-2, 0], pos, true);

+ 3 - 0
PhysicsPlatformer/Resources/Components/Background.js

@@ -19,6 +19,9 @@ function postUpdate() {
     var pos = cameraNode.position2D; 
     pos[1] -= 4;
     node.position2D = pos;
+    var zoom = 4.0 - camera.zoom;
+    node.scale2D = [zoom, zoom];
+    
     
 
 }

+ 5 - 5
PhysicsPlatformer/Resources/Levels/ForestTilesExtruded.tsx

@@ -3,7 +3,7 @@
  <image source="ForestTilesExtruded.png" width="512" height="1024"/>
  <tile id="0">
   <objectgroup draworder="index">
-   <object x="2" y="2" width="124" height="124"/>
+   <object x="0" y="0" width="128" height="128"/>
   </objectgroup>
  </tile>
  <tile id="4">
@@ -25,22 +25,22 @@
  </tile>
  <tile id="10">
   <objectgroup draworder="index">
-   <object x="2" y="2" width="124" height="125"/>
+   <object x="0" y="0" width="128" height="128"/>
   </objectgroup>
  </tile>
  <tile id="11">
   <objectgroup draworder="index">
-   <object x="1" y="2" width="126" height="124"/>
+   <object x="0" y="0" width="128" height="128"/>
   </objectgroup>
  </tile>
  <tile id="12">
   <objectgroup draworder="index">
-   <object x="0" y="-1" width="126" height="131"/>
+   <object x="0" y="0" width="128" height="128"/>
   </objectgroup>
  </tile>
  <tile id="14">
   <objectgroup draworder="index">
-   <object x="2" y="2" width="124" height="125"/>
+   <object x="0" y="0" width="128" height="128"/>
   </objectgroup>
  </tile>
 </tileset>

File diff suppressed because it is too large
+ 1224 - 196
PhysicsPlatformer/Resources/Levels/Level1.tmx


Some files were not shown because too many files changed in this diff