~rick-rickspencer3/pygame-template/trunk

« back to all changes in this revision

Viewing changes to crashteroids/enemy.py

  • Committer: Rick Spencer
  • Date: 2010-03-13 17:15:25 UTC
  • Revision ID: rick.spencer@canonical.com-20100313171525-gnyb9pyrurfghrp1
made update_image a private function (_update_image). Completed documentation for BaseSprite.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import crashteroidsconfig
4
4
 
5
5
class Enemy(BaseSprite):
6
 
 def __init__(self):
7
 
  BaseSprite.__init__(self, crashteroidsconfig.enemy_image)
8
 
  self.points = 1
9
 
  self.accelerationDivisor = 1  
10
 
  random.seed()
11
 
  self.orientation = 0
12
 
  self.rotatingRight = False
13
 
  self.rotatingLeft = False
14
 
  self.rotationRate = 0
15
 
  self.velocityX = 0
16
 
  self.velocityY = 0
17
 
  self.init_position()
 
6
    def __init__(self):
 
7
        BaseSprite.__init__(self, crashteroidsconfig.enemy_image)
 
8
            self.points = 1
 
9
            self.accelerationDivisor = 1  
 
10
            self.orientation = 0
 
11
            self.rotatingRight = False
 
12
            self.rotatingLeft = False
 
13
            self.rotationRate = 0
 
14
            self.velocityX = 0
 
15
            self.velocityY = 0
 
16
            self.init_position()