예제 #1
0
 def respawn(self, pos):
     """Respawn powerup."""
     self.pos = pos
     self.pot_field = PotentialField.create(self.game.tilemap.width,
                                            self.game.tilemap.height, pos)
     self.elapsed_lifetime = 0
     self.elapsed_blink = 0
     self.isalive = True
     self.isvisible = True
예제 #2
0
 def reinit(self, pos, prototype):
     """Reinit powerup."""
     self.pot_field = PotentialField.create(self.game.tilemap.width,
                                            self.game.tilemap.height, pos)
     self.respawn(pos)
     self.tex = prototype['tex']
     self.actions = prototype['actions']
     self.lifetime = prototype.get('lifetime', 100000)
     self.blinkrate = prototype.get('blinkrate', 100000)
     self.startblinkingat = prototype.get('startblinkingat', 100000)
     self.autorespawn = prototype.get('autorespawn', False)