Changeset 103:aaef228b6358


Ignore:
Timestamp:
Apr 4, 2011, 6:46:44 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Run kitsune, run! And by the running of the kitsune gravity is restored to normal.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r98 r103  
    8282class World(object):
    8383
    84     GRAVITY = 9.8 * 20.0 # pixels / s^2
     84    GRAVITY = 0.0, 9.8 * 20.0 # pixels / s^2
    8585
    8686    def __init__(self):
     
    140140
    141141        # gravity
    142         dv = (-self.GRAVITY * 0.5 * dt, self.GRAVITY * dt)
     142        dv = self.GRAVITY[0] * dt, self.GRAVITY[1] * dt
    143143        for sprite in self._gravitators:
    144144            sprite.deltav(dv)
  • skaapsteker/sprites/player.py

    r102 r103  
    4444
    4545    def action_left(self):
    46         print "L"
     46        self.deltav((-100.0, 0.0))
    4747
    4848    def action_right(self):
    49         print "R"
     49        self.deltav((100.0, 0.0))
    5050
    5151    def action_up(self):
    52         print "U"
     52        self.deltav((0.0, -100.0))
    5353
    5454    def action_down(self):
    55         print "D"
     55        self.deltav((0.0, 100.0))
    5656
    5757    def action_fire1(self):
Note: See TracChangeset for help on using the changeset viewer.