コード例 #1
0
 def add_spider(self):
     if Globals.num_spiders < 1:
         Globals.num_spiders += 1
         self.add_room_object(
             Insect(self, 0, 0, self.splat_sound, self.spider_image,
                    self.splat_image, 4, 100))
         self.set_timer(40, self.add_spider)
コード例 #2
0
 def add_roach(self):
     if Globals.num_roaches < 2:
         Globals.num_roaches += 1
         self.add_room_object(
             Insect(self, 0, 0, self.splat_sound, self.roach_image,
                    self.splat_image, 2, 50))
         self.set_timer(240, self.add_roach)
コード例 #3
0
 def add_scorpion(self):
     if Globals.num_scorpions < 1:
         Globals.num_roaches += 1
         self.add_room_object(
             Insect(self, 0, 0, self.splat_sound, self.scorpion_image,
                    self.splat_image, 3, 75))
         self.set_timer(120, self.add_scorpion)
コード例 #4
0
 def add_ant(self):
     if Globals.num_ants < 2:
         Globals.num_ants += 1
         self.add_room_object(
             Insect(self, 0, 0, self.splat_sound, self.ant_image,
                    self.splat_image, 2, 25))
         self.set_timer(120, self.add_ant)