Changeset 22:b815471d4b95


Ignore:
Timestamp:
Apr 3, 2011, 3:55:07 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Move sprite base class into physics since they're tightly coupled.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r18 r22  
     1"""Model of gravity, acceleration, velocities and collisions.
     2
     3   Works very closely with sprites/base.py.
     4   """
     5
     6import pygame.sprite
     7
     8
     9class Sprite(pygame.sprite.Sprite):
     10
     11    mobile = True # whether the velocity may be non-zero
     12    gravitates = True # whether gravity applies to the sprite
     13
     14
     15class World(object):
     16    pass
  • skaapsteker/sprites/base.py

    r18 r22  
    11"""Basic sprite classes."""
    22
    3 import pygame.sprite
    4 
    5 
    6 class Sprite(pygame.sprite.Sprite):
    7     mobile = True # whether the velocity may be non-zero
    8     gravitates = True # whether gravity applies to the sprite
     3from skaapsteker.physics import Sprite
    94
    105
Note: See TracChangeset for help on using the changeset viewer.