Changeset 73

Show
Ignore:
Timestamp:
12/02/07 17:02:24 (1 year ago)
Author:
clayasaurus
Message:

plaer coesa

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/player.d

    r71 r73  
    6767    void advanceScenegraph (float msDt) 
    6868    { 
     69        physics.velocity = Point(1,1); 
     70     
    6971        if (arc.input.keyDown(ARC_LEFT)) 
    70             physics.rotation = physics.rotation + 0.01; 
     72            physics.angularVelocity = physics.angularVelocity + 0.01; 
    7173        if (arc.input.keyDown(ARC_LEFT)) 
    72             physics.rotation = physics.rotation - 0.01; 
     74            physics.angularVelocity = physics.angularVelocity - 0.01; 
     75             
    7376        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); 
    7578        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); 
    7780        else 
    78             physics.velocity = Point(0,0); 
     81            physics.force = Point(0,0); 
    7982    } 
    8083