Mercurial > skaapsteker
changeset 22:b815471d4b95
Move sprite base class into physics since they're tightly coupled.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sun, 03 Apr 2011 17:55:07 +0200 |
parents | fedaf16a4ddf |
children | 5c9f2eeeb629 |
files | skaapsteker/physics.py skaapsteker/sprites/base.py |
diffstat | 2 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/skaapsteker/physics.py Sun Apr 03 17:38:36 2011 +0200 +++ b/skaapsteker/physics.py Sun Apr 03 17:55:07 2011 +0200 @@ -0,0 +1,16 @@ +"""Model of gravity, acceleration, velocities and collisions. + + Works very closely with sprites/base.py. + """ + +import pygame.sprite + + +class Sprite(pygame.sprite.Sprite): + + mobile = True # whether the velocity may be non-zero + gravitates = True # whether gravity applies to the sprite + + +class World(object): + pass
--- a/skaapsteker/sprites/base.py Sun Apr 03 17:38:36 2011 +0200 +++ b/skaapsteker/sprites/base.py Sun Apr 03 17:55:07 2011 +0200 @@ -1,11 +1,6 @@ """Basic sprite classes.""" -import pygame.sprite - - -class Sprite(pygame.sprite.Sprite): - mobile = True # whether the velocity may be non-zero - gravitates = True # whether gravity applies to the sprite +from skaapsteker.physics import Sprite class Monster(Sprite):