attack and damage sound effects
This commit is contained in:
parent
e1ab123bdd
commit
5e941dbd5b
18
NS.py
18
NS.py
|
@ -1701,6 +1701,14 @@ class Boss(Animation):
|
|||
frame = background.frames[0].copy()
|
||||
frame.fill((0, 150, 150), None, pygame.BLEND_RGB_SUB)
|
||||
background.add_frame(frame)
|
||||
# Shining background
|
||||
background.add_frameset(name="shining", switch=True, framerate=120)
|
||||
for hue in range(0, 360, 40):
|
||||
frame = background.frames[0].copy()
|
||||
color = Color(0, 0, 0)
|
||||
color.hsla = hue, 30, 30, 100
|
||||
frame.fill(color, None, pygame.BLEND_RGB_ADD)
|
||||
background.add_frame(frame)
|
||||
background.set_frameset("normal")
|
||||
self.countdown = Countdown(self)
|
||||
# Set the alien's arm to its own sprite
|
||||
|
@ -1785,7 +1793,7 @@ class Boss(Animation):
|
|||
dialogue.set_avatar(self.visitor_avatar)
|
||||
dialogue.set_name("Visitor")
|
||||
self.visitor.hide()
|
||||
self.play(self.enter_boss, play_once=True, delay=2000)
|
||||
self.play(self.enter_boss, play_once=True, delay=1500)
|
||||
elif index == 2:
|
||||
dialogue.set_avatar(self.spoopy_avatar)
|
||||
dialogue.set_name("Spoopy")
|
||||
|
@ -1796,6 +1804,8 @@ class Boss(Animation):
|
|||
self.get_game().platform.activate()
|
||||
self.get_game().chemtrails.activate()
|
||||
self.last_attack = NS.NW
|
||||
self.backgrounds[self.level_index].set_frameset("normal")
|
||||
self.halt(self.flash_player_damage)
|
||||
|
||||
def show_introduction_dialogue(self):
|
||||
dialogue = self.get_game().dialogue
|
||||
|
@ -2039,6 +2049,9 @@ class Boss(Animation):
|
|||
elif self.level_index == 2:
|
||||
self.spoopy.set_frameset(0)
|
||||
self.add_score()
|
||||
self.backgrounds[self.level_index].set_frameset("shining")
|
||||
else:
|
||||
self.play(self.flash_player_damage)
|
||||
self.player_defeated = not win
|
||||
self.kills += not win
|
||||
self.play(self.show_end_dialogue, delay=3000, play_once=True)
|
||||
|
@ -2050,6 +2063,7 @@ class Boss(Animation):
|
|||
def show_end_dialogue(self):
|
||||
dialogue = self.get_game().dialogue
|
||||
dialogue.activate()
|
||||
self.get_audio().play_sfx("die")
|
||||
if self.level_index == 0:
|
||||
if self.player_defeated:
|
||||
dialogue.show_text("Maybe next time!")
|
||||
|
@ -2483,10 +2497,12 @@ class Sword(Animation):
|
|||
if self.attacking_player and ii == self.active_sprite_index:
|
||||
sprite.hide()
|
||||
self.get_game().boss.start_player_damage()
|
||||
self.get_audio().play_sfx("damage", x=sprite.location.centerx)
|
||||
else:
|
||||
center_save = sprite.location.center
|
||||
sprite.set_frameset("explode")
|
||||
sprite.location.center = center_save
|
||||
self.get_audio().play_sfx("explode", x=sprite.location.centerx)
|
||||
if self.parent.level_index == 1:
|
||||
if self.parent.is_playing(self.parent.end_hit_animation, include_delay=True):
|
||||
self.parent.halt(self.parent.end_hit_animation)
|
||||
|
|
|
@ -12,3 +12,5 @@
|
|||
54614
|
||||
52434
|
||||
168209
|
||||
141407
|
||||
139786
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue