Browse Source

More tweaks

Josh Engebretson 11 years ago
parent
commit
82adff3052

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

@@ -108,9 +108,9 @@ function handleAnimation(timeStep) {
         }
     } else {
 
-        if (vel[1] > 0) {
+        if (vel[1] > 1.0) {
             setAnimation("Jump");
-        } else if (vel[1] < 0) {
+        } else if (vel[1] < -1.0) {
             setAnimation("Land");
         }
 
@@ -183,7 +183,7 @@ function handleInput(timeStep) {
         circle.friction = 0.0;
 
     if (jump && contactCount) {
-        //soundSource.gain = 0.75;
+        self.soundSource.gain = 0.75;
         self.soundSource.play(jumpSound);
 
         vel[1] = 0;

+ 2 - 0
PhysicsPlatformer/Resources/Levels/Level1.tmx

@@ -12,6 +12,8 @@
   <object gid="31" x="3276.42" y="1792.54"/>
   <object gid="30" x="3212.43" y="1792.7"/>
   <object gid="34" x="2248.94" y="1794.5"/>
+  <object gid="36" x="199.733" y="1282.59"/>
+  <object gid="35" x="3142.91" y="1796.86"/>
  </objectgroup>
  <layer name="Water" width="32" height="32">
   <data>