示例#1
0
 def update(self):
     # pos = pygame.mouse.get_pos()
     self.lock.acquire()
     # self.setXY(pos[0], pos[1])
     self.setXY(self.pos_toset[0], self.pos_toset[1])
     self.lock.release()
     if self.toshoot and self.shoot_released:
         self.shoot_lock.acquire()
         self.toshoot = False
         self.shoot_lock.release()
         self.shoot_released_lock.acquire()
         self.shoot_released = False
         self.shoot_released_lock.release()
         # self.shoot_obj.shootMain()
         import Main
         Main.shoot()
     if self.shot and self.recoil >= 6:
         self.recoil -= 6
     else:
         self.recoil = 0
         self.shot = False
示例#2
0
 def shootMain(self):
     Main.shoot()