Changeset 73
- Timestamp:
- 12/02/07 17:02:24 (1 year ago)
- Files:
-
- trunk/src/player.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/player.d
r71 r73 67 67 void advanceScenegraph (float msDt) 68 68 { 69 physics.velocity = Point(1,1); 70 69 71 if (arc.input.keyDown(ARC_LEFT)) 70 physics. rotation = physics.rotation+ 0.01;72 physics.angularVelocity = physics.angularVelocity + 0.01; 71 73 if (arc.input.keyDown(ARC_LEFT)) 72 physics.rotation = physics.rotation - 0.01; 74 physics.angularVelocity = physics.angularVelocity - 0.01; 75 73 76 if (arc.input.keyDown(ARC_UP)) 74 physics. translation = Point.fromPolar(0.5, physics.rotation- PI/2);77 physics.force = Point.fromPolar(0.5, physics.angularVelocity - PI/2); 75 78 else if(arc.input.keyDown(ARC_DOWN)) 76 physics. translation = Point.fromPolar(-0.5, physics.rotation- PI/2);79 physics.force = Point.fromPolar(-0.5, physics.angularVelocity - PI/2); 77 80 else 78 physics. velocity= Point(0,0);81 physics.force = Point(0,0); 79 82 } 80 83
