Dominic Kexel avatar Dominic Kexel committed df0918b Draft

fixed bug. added turbo (t)

Comments (0)

Files changed (3)

 class Actor(object):
   
-  def __init__(self, on_die=None, **kwargs):
+  def __init__(self, die_callback=None, **kwargs):
     self.scene = kwargs['scene']
-    self._on_die = on_die
+    self._die_callback = die_callback
     self.z = 0
     self.scene.create(self)
     self._alpha = 255
     
   def die(self):
     self.scene.destroy(self)
-    if self._on_die: self._on_die()
+    if self._die_callback: self._die_callback()
 
   def update(self):
     pass
   def enter(self, **kwargs):
     if 'backnav' in kwargs: 
       for s in self._silos:
-        if not self._silos[s]._hit:
+        if not self._silos[s].is_hit:
           self._silos[s].rockets += 10
     else:
       if self._initialized: return
   def run(self):
     while self._running:
       self.tick += 1
-      self._clock.tick(self._fps)
+      self._clock.tick(self._fps if not pygame.key.get_pressed()[pygame.K_t] else 999999)
       for event in event_generator():
         self._scenes.handle_event(event)
       self._scenes.update_state()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.