Mercurial > fife-parpg
comparison demos/shooter/scripts/ships/enemies.py @ 479:ab28994820dd
Added some powerups including a spread weapon and an extra life.
Fixed the problem where the player could fly off the screen.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 23 Apr 2010 17:17:02 +0000 |
parents | 6b33d80b468b |
children | 82d44c471959 |
comparison
equal
deleted
inserted
replaced
478:41f7754f2a4b | 479:ab28994820dd |
---|---|
48 | 48 |
49 | 49 |
50 class Saucer1(Ship): | 50 class Saucer1(Ship): |
51 def __init__(self, scene, name, instance, findInstance=True): | 51 def __init__(self, scene, name, instance, findInstance=True): |
52 super(Saucer1, self).__init__(scene, name, findInstance) | 52 super(Saucer1, self).__init__(scene, name, findInstance) |
53 self._instance = instance | 53 self.instance = instance |
54 self._type = SHTR_ENEMYSHIP | 54 self._type = SHTR_ENEMYSHIP |
55 self._dir = 0 | 55 self._dir = 0 |
56 self._time = 500 | 56 self._time = 500 |
57 self.width = 0.2 | 57 self.width = 0.2 |
58 self.height = 0.075 | 58 self.height = 0.075 |
88 | 88 |
89 | 89 |
90 class Saucer2(Ship): | 90 class Saucer2(Ship): |
91 def __init__(self, scene, name, instance, findInstance=True): | 91 def __init__(self, scene, name, instance, findInstance=True): |
92 super(Saucer2, self).__init__(scene, name, findInstance) | 92 super(Saucer2, self).__init__(scene, name, findInstance) |
93 self._instance = instance | 93 self.instance = instance |
94 self._type = SHTR_ENEMYSHIP | 94 self._type = SHTR_ENEMYSHIP |
95 self._dir = 0 | 95 self._dir = 0 |
96 self._time = 1000 | 96 self._time = 1000 |
97 self.width = 0.2 | 97 self.width = 0.2 |
98 self.height = 0.2 | 98 self.height = 0.2 |
131 self.fire(fife.DoublePoint(-1,0)) | 131 self.fire(fife.DoublePoint(-1,0)) |
132 | 132 |
133 class DiagSaucer(Ship): | 133 class DiagSaucer(Ship): |
134 def __init__(self, scene, name, direction, instance, findInstance=True): | 134 def __init__(self, scene, name, direction, instance, findInstance=True): |
135 super(DiagSaucer, self).__init__(scene, name, findInstance) | 135 super(DiagSaucer, self).__init__(scene, name, findInstance) |
136 self._instance = instance | 136 self.instance = instance |
137 self._type = SHTR_ENEMYSHIP | 137 self._type = SHTR_ENEMYSHIP |
138 self.width = 0.2 | 138 self.width = 0.2 |
139 self.height = 0.075 | 139 self.height = 0.075 |
140 | 140 |
141 if direction == 0: | 141 if direction == 0: |
159 | 159 |
160 | 160 |
161 class Streaker(Ship): | 161 class Streaker(Ship): |
162 def __init__(self, scene, name, instance, findInstance=True): | 162 def __init__(self, scene, name, instance, findInstance=True): |
163 super(Streaker, self).__init__(scene, name, findInstance) | 163 super(Streaker, self).__init__(scene, name, findInstance) |
164 self._instance = instance | 164 self.instance = instance |
165 self._type = SHTR_ENEMYSHIP | 165 self._type = SHTR_ENEMYSHIP |
166 self.width = 0.2 | 166 self.width = 0.2 |
167 self.height = 0.2 | 167 self.height = 0.2 |
168 | 168 |
169 self._maxvelocity = 2.0 | 169 self._maxvelocity = 2.0 |
194 | 194 |
195 | 195 |
196 class Boss(Ship): | 196 class Boss(Ship): |
197 def __init__(self, scene, name, instance, findInstance=True): | 197 def __init__(self, scene, name, instance, findInstance=True): |
198 super(Boss, self).__init__(scene, name, findInstance) | 198 super(Boss, self).__init__(scene, name, findInstance) |
199 self._instance = instance | 199 self.instance = instance |
200 self._type = SHTR_LASTBOSS | 200 self._type = SHTR_LASTBOSS |
201 self.width = 0.85 | 201 self.width = 0.85 |
202 self.height = 0.25 | 202 self.height = 0.25 |
203 | 203 |
204 self._maxvelocity = 2.0 | 204 self._maxvelocity = 2.0 |