Exemplo n.º 1
0
 def onMouseDown(self, event):
     if event.button is 1:
         Camera.current_camera.get_component('CameraTrackingBehavior').target = Game.camera_to_world(event.pos)
         
         c = Crosshair(ResourceLoader.load('data//crosshair.png'))
         c.position = Game.camera_to_world(event.pos)
         self.add(c)
Exemplo n.º 2
0
 def onMouseDown(self, event):
     if event.button == 1:
         num_puffs = 8.0
         for i in range(int(num_puffs) + 1):
             theta = 0 + (360 * (i / num_puffs))
             
             e = PuffEmitter(2000)
             e.position = Vector2D(Game.camera_to_world(event.pos))
             e.velocity = Vector2D.from_angle(theta) * -180.0
             self.add(e)
Exemplo n.º 3
0
 def onMouseDown(self, event):
     if event.button is 1:
         sprite = self.pool.getNextAvailable()
         sprite.position = Game.camera_to_world(event.pos)
Exemplo n.º 4
0
 def is_time_up(self):
     return Game.time() > self.__time_up
Exemplo n.º 5
0
 def reset(self):
     self.__time_up = Game.time() + self.__interval