Esempio n. 1
0
 def bullet_phase1(self):
     if self.time % 20 < 9:
         radian = ((self.time % 9) * 45) / 180 * math.pi
         self.fire_bullet(radian)
     if int(self.time % 15) == 0 and int(self.time) < 250:
         radian = ((self.time % 90)+150) / 180 * math.pi
         self.fire_bullet(radian)
     if int(self.time % 30) == 0:
         Enemy_1.fire_bullet(self)
Esempio n. 2
0
 def bullet_phase2(self):
     if int(self.time % 10) == 0 and int(self.time) < 350:
         radian = ((self.time % 90)) / 180 * math.pi
         self.fire_bullet(radian)
         radian = ((self.time % 90)+90) / 180 * math.pi
         self.fire_bullet(radian)
         radian = ((self.time % 90) + 180) / 180 * math.pi
         self.fire_bullet(radian)
         radian = ((self.time % 90) + 270) / 180 * math.pi
         self.fire_bullet(radian)
     if int(self.time % 5) == 0 and int(self.time) > 300:
         radian = ((self.time % 120)+120) / 180 * math.pi
         self.fire_bullet(radian)
     if int(self.time % 20) == 0:
         Enemy_1.fire_bullet(self)
Esempio n. 3
0
 def phase0(self):
     if int(self.spawntimer) % 30 == 0:  # type1 spawn
         if self.type1_counter < 10 and self.spawntimer < 500:
             enemy = Enemy_1(1200, 1000, 500, -200, 0, -200)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1200, -200, 500, 200, 0, 800)
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
         elif self.type1_counter < 10 and self.spawntimer > 500:
             enemy = Enemy_1(1800, 200, 500, 200, 0, 0)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1800, 600, 0, -500, 0,
                             600)  # 시작위치, 꺾이는 정도, 끝 위치
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
Esempio n. 4
0
 def phase3(self):
     if int(self.spawntimer) % 150 == 0:  # type1 spawn
         if self.type1_counter < 4 and self.spawntimer < 500:
             enemy = Enemy_1(1200, 1000, 500, -200, 0, -200)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1200, -200, 500, 200, 0, 800)
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
         elif self.type1_counter < 4 and self.spawntimer > 500:
             enemy = Enemy_1(1800, 200, 500, 200, 0, 0)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1800, 600, 0, -500, 0,
                             600)  # 시작위치, 꺾이는 정도, 끝 위치
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
     if self.type3_counter < 1 and int(self.spawntimer) % 350 == 0:
         enemy = Enemy_3(1700, 200, -500, 0, 1400, 350)
         game_world.add_object(enemy, 1)
         self.type3_counter += 1
Esempio n. 5
0
 def phase1(self):
     if int(self.spawntimer) % 30 == 0:  # type1 spawn
         if self.type1_counter < 6 and self.spawntimer < 500:
             enemy = Enemy_1(1200, 1000, 500, -200, 0, -200)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1200, -200, 500, 200, 0, 800)
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
         elif self.type1_counter < 6 and self.spawntimer > 500:
             enemy = Enemy_1(1800, 200, 500, 200, 0, 0)
             game_world.add_object(enemy, 1)
             enemy = Enemy_1(1800, 600, 0, -500, 0,
                             600)  # 시작위치, 꺾이는 정도, 끝 위치
             game_world.add_object(enemy, 1)
             self.type1_counter += 2
     if self.type2_counter < 2 and self.spawntimer < 150:  # type2 spawn
         enemy = Enemy_2(1700, 550, -500, 0, 1400, 550)
         game_world.add_object(enemy, 1)
         enemy = Enemy_2(1700, 200, -500, 0, 1400, 350)
         game_world.add_object(enemy, 1)
         enemy = Enemy_2(1700, 350, -500, 0, 1400, 200)
         game_world.add_object(enemy, 1)
         self.type2_counter += 3
Esempio n. 6
0
 def bullet_phase0(self):
     if self.time % 40 < 13:
         radian = ((self.time % 13) * 30) / 180 * math.pi
         self.fire_bullet(radian)
     if int(self.time % 50) == 0:
         Enemy_1.fire_bullet(self)