Permalink
Browse files

final tournament map

  • Loading branch information...
1 parent f922f7a commit 99b49e306ebb71dfedd31125dab48102a40a79e8 @luciotorre committed Jul 8, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 spacecraft/world.py
View
@@ -70,6 +70,12 @@ def __init__(self, xsize, ysize, frames=20, start=False):
self.status = STATUS_WAITING
self.winner = None
self.update_loop = task.LoopingCall(self.doStep)
+ x, y = self.xsize * random.random(), self.ysize * random.random()
+ print "creating powerup at", x, y
+ RapidFirePowerUpRespawn(self, x, y)
+ print "creating powerup at", x, y
+ RapidFirePowerUpRespawn(self, x, y)
+
def start_game(self):
self.status = STATUS_RUNNING
@@ -253,6 +259,14 @@ def contact(self, other):
super(RapidFirePowerUp, self).contact(other)
+class RapidFirePowerUpRespawn(RapidFirePowerUp):
+ def contact(self, other):
+ super(RapidFirePowerUp, self).contact(other)
+ self.__class__(self.map, self.map.xsize * random.random(),
+ self.map.ysize * random.random())
+
+
+
class RapidFireEffect:
def __init__(self, duration, ratio):
self.d = duration

0 comments on commit 99b49e3

Please sign in to comment.