disable sound loading and playing
This commit is contained in:
parent
63a7ddf51f
commit
f04c51608c
62
NS.py
62
NS.py
|
@ -705,8 +705,8 @@ class LevelSelect(Animation):
|
|||
self.grow_sound_channel = None
|
||||
break
|
||||
else:
|
||||
if self.grow_sound_channel is None:
|
||||
self.grow_sound_channel = self.get_audio().play_sfx("grow", -1, x=platform.view.location.centerx)
|
||||
# if self.grow_sound_channel is None:
|
||||
# self.grow_sound_channel = self.get_audio().play_sfx("grow", -1, x=platform.view.location.centerx)
|
||||
# Draw a growing ring around the currently pressed level
|
||||
angle = self.get_game().platform.press_elapsed / self.get_configuration("time", "level-select-press-length") * 2 * pi
|
||||
diameter = self.previews[level_index].location.height + 21
|
||||
|
@ -723,7 +723,7 @@ class LevelSelect(Animation):
|
|||
if level_index != self.level_index_selected:
|
||||
self.platforms[level_index].view.play(self.platforms[level_index].view.wipe_out)
|
||||
self.previews[level_index].play(self.previews[level_index].wipe_out, interval=100)
|
||||
self.get_audio().play_sfx("complete_pattern_3")
|
||||
# self.get_audio().play_sfx("complete_pattern_3")
|
||||
elif not self.get_game().wipe.is_playing() and any(preview.is_hidden() for preview in self.previews):
|
||||
self.get_game().wipe.start(self.launch_selected_index)
|
||||
for platform in self.platforms:
|
||||
|
@ -888,9 +888,9 @@ class Tony(Sprite):
|
|||
self.add_frameset([0], name="static")
|
||||
self.add_frameset(range(1, len(self.frames)), name="board")
|
||||
self.taunts = []
|
||||
for sfx_name in self.get_audio().sfx:
|
||||
if sfx_name.startswith("TonyTauntsBend_"):
|
||||
self.taunts.append(sfx_name)
|
||||
# for sfx_name in self.get_audio().sfx:
|
||||
# if sfx_name.startswith("TonyTauntsBend_"):
|
||||
# self.taunts.append(sfx_name)
|
||||
self.location.centerx = dsr.centerx
|
||||
self.board.location.centerx = self.location.centerx
|
||||
|
||||
|
@ -909,8 +909,8 @@ class Tony(Sprite):
|
|||
def shift_frame(self):
|
||||
Sprite.shift_frame(self)
|
||||
frameset = self.get_current_frameset()
|
||||
if frameset.name == "board" and frameset.current_index == 1:
|
||||
self.get_audio().play_sfx(choice(self.taunts))
|
||||
# if frameset.name == "board" and frameset.current_index == 1:
|
||||
# self.get_audio().play_sfx(choice(self.taunts))
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
|
@ -1101,7 +1101,7 @@ class Title(Animation):
|
|||
platform.set_glowing(platform.get_buttons_from_edges([self.UNLOCK_MOVES[self.unlock_index]]))
|
||||
self.get_game().chemtrails.activate()
|
||||
self.get_game().tony.set_frameset("static")
|
||||
self.get_audio().play_bgm("title")
|
||||
# self.get_audio().play_bgm("title")
|
||||
|
||||
# Blit the scores
|
||||
for sprite in self.score_sprites:
|
||||
|
@ -1281,11 +1281,11 @@ class Title(Animation):
|
|||
if self.unlock_index == len(self.UNLOCK_MOVES) - 1:
|
||||
platform.set_glowing([])
|
||||
self.get_game().wipe.start(self.start_game)
|
||||
self.get_audio().play_sfx("confirm")
|
||||
# self.get_audio().play_sfx("confirm")
|
||||
else:
|
||||
self.unlock_index += 1
|
||||
platform.set_glowing(platform.get_buttons_from_edges([self.UNLOCK_MOVES[self.unlock_index]]))
|
||||
self.get_audio().play_sfx("land_0")
|
||||
# self.get_audio().play_sfx("land_0")
|
||||
self.get_game().tony.update()
|
||||
|
||||
# Bounce the GIF around the screen
|
||||
|
@ -1389,7 +1389,7 @@ class Dialogue(Animation):
|
|||
def show_text(self, text):
|
||||
self.full_text = text
|
||||
self.text_index = 0
|
||||
self.speech_channel = self.get_audio().play_sfx("talk", -1)
|
||||
# self.speech_channel = self.get_audio().play_sfx("talk", -1)
|
||||
self.play()
|
||||
|
||||
def build_frame(self):
|
||||
|
@ -1447,7 +1447,7 @@ class SkipPrompt(GameChild):
|
|||
self.text.location.midleft = (
|
||||
self.buttons[2].location.right + 5,
|
||||
self.buttons[2].location.centery)
|
||||
self.button_sound = self.get_audio().sfx["button"]
|
||||
# self.button_sound = self.get_audio().sfx["button"]
|
||||
|
||||
def reset(self):
|
||||
self.press_index = 0
|
||||
|
@ -1471,7 +1471,7 @@ class SkipPrompt(GameChild):
|
|||
self.pluses[1].hide()
|
||||
elif self.press_index == 2 and platform.get_edge_pressed() == NS.W:
|
||||
self.callback()
|
||||
self.get_audio().play_sfx("confirm")
|
||||
# self.get_audio().play_sfx("confirm")
|
||||
elif self.press_index > 0:
|
||||
self.press_elapsed += self.get_game().time_filter.get_last_frame_duration()
|
||||
if self.press_elapsed > 4000:
|
||||
|
@ -1524,12 +1524,12 @@ class AdvancePrompt(GameChild):
|
|||
self.first_pressed = True
|
||||
self.buttons[0].hide()
|
||||
self.plus.hide()
|
||||
self.get_audio().play_sfx("button")
|
||||
# self.get_audio().play_sfx("button")
|
||||
|
||||
def check_second_press(self):
|
||||
pressed = self.first_pressed and self.get_game().platform.get_edge_pressed() == NS.NW
|
||||
if pressed:
|
||||
self.get_audio().play_sfx("confirm")
|
||||
# if pressed:
|
||||
# self.get_audio().play_sfx("confirm")
|
||||
return pressed
|
||||
|
||||
def update(self):
|
||||
|
@ -1559,7 +1559,7 @@ class Wipe(Animation):
|
|||
"""
|
||||
Animation.__init__(self, parent)
|
||||
self.image = load(self.get_resource("Ink.png")).convert()
|
||||
self.sound = self.get_audio().sfx["wipe"]
|
||||
# self.sound = self.get_audio().sfx["wipe"]
|
||||
self.callback_kwargs = {}
|
||||
|
||||
def reset(self):
|
||||
|
@ -1588,7 +1588,7 @@ class Wipe(Animation):
|
|||
self.callback = callback
|
||||
self.callback_kwargs = kwargs
|
||||
self.play()
|
||||
self.sound.play()
|
||||
# self.sound.play()
|
||||
|
||||
def build_frame(self):
|
||||
"""
|
||||
|
@ -2108,9 +2108,9 @@ class Chemtrails(Sprite):
|
|||
self.timer.reset()
|
||||
if not boss.is_playing(boss.show_end_dialogue, include_delay=True):
|
||||
boss.combo()
|
||||
self.get_audio().play_sfx("complete_pattern_3")
|
||||
else:
|
||||
self.get_audio().play_sfx("land_0")
|
||||
# self.get_audio().play_sfx("complete_pattern_3")
|
||||
# else:
|
||||
# self.get_audio().play_sfx("land_0")
|
||||
self.get_game().platform.reset_lights()
|
||||
|
||||
def orient(self):
|
||||
|
@ -2242,7 +2242,7 @@ class Life(Meter):
|
|||
Remove one health point. Set the current sword to attacking the chameleon. If this meter is depleted, remove a life
|
||||
and trigger the boss's battle finish method.
|
||||
"""
|
||||
self.get_audio().play_sfx("hurt")
|
||||
# self.get_audio().play_sfx("hurt")
|
||||
self.change(-1)
|
||||
self.get_game().boss.sword.attack(player=True)
|
||||
if self.amount <= 0:
|
||||
|
@ -2438,7 +2438,7 @@ class Boss(Animation):
|
|||
dialogue.set_name("Spoopy")
|
||||
self.spoopy.hide()
|
||||
self.play(self.enter_boss, play_once=True, delay=1500)
|
||||
self.get_audio().play_bgm(f"level_{index}")
|
||||
# self.get_audio().play_bgm(f"level_{index}")
|
||||
self.play(self.show_introduction_dialogue, delay=3000, play_once=True)
|
||||
self.get_game().platform.activate()
|
||||
self.get_game().chemtrails.activate()
|
||||
|
@ -2701,7 +2701,7 @@ class Boss(Animation):
|
|||
def show_end_dialogue(self):
|
||||
dialogue = self.get_game().dialogue
|
||||
dialogue.activate()
|
||||
self.get_audio().play_sfx("die")
|
||||
# self.get_audio().play_sfx("die")
|
||||
if self.level_index == 0:
|
||||
if self.player_defeated:
|
||||
dialogue.show_text("Maybe next time!")
|
||||
|
@ -3099,7 +3099,7 @@ class Sword(Animation):
|
|||
else:
|
||||
sprite.location.center = dsr.centerx, dsr.centery - 80
|
||||
self.sprites.append(sprite)
|
||||
self.get_audio().play_sfx("brandish")
|
||||
# self.get_audio().play_sfx("brandish")
|
||||
# Set brandish to complete on a delay
|
||||
self.play(self.lower, delay=400, play_once=True)
|
||||
# Brandish more swords
|
||||
|
@ -3174,13 +3174,13 @@ 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)
|
||||
# self.get_audio().play_sfx("damage", x=sprite.location.centerx)
|
||||
self.get_game().chemtrails.display_hurt()
|
||||
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)
|
||||
# self.get_audio().play_sfx("explode", x=sprite.location.centerx)
|
||||
if self.parent.is_playing(self.parent.end_hit_animation, include_delay=True):
|
||||
self.parent.halt(self.parent.end_hit_animation)
|
||||
self.parent.level_sprite().set_frameset("hurt")
|
||||
|
@ -3229,8 +3229,8 @@ class Health(Meter):
|
|||
self.parent.damage()
|
||||
if self.amount <= 0:
|
||||
self.amount = 0
|
||||
self.get_audio().play_sfx("complete_pattern_1")
|
||||
self.get_audio().play_sfx("defeat")
|
||||
# self.get_audio().play_sfx("complete_pattern_1")
|
||||
# self.get_audio().play_sfx("defeat")
|
||||
self.get_game().boss.finish_battle(True)
|
||||
else:
|
||||
self.parent.play(self.parent.cancel_flash, delay=1000, play_once=True)
|
||||
|
@ -3299,7 +3299,7 @@ class Ending(Animation):
|
|||
dialogue.set_name("???")
|
||||
dialogue.show_text("")
|
||||
self.play(self.start_wipe, delay=self.get_configuration("time", "ending-timeout"), play_once=True)
|
||||
self.get_audio().play_bgm("end")
|
||||
# self.get_audio().play_bgm("end")
|
||||
self.slime_bag.activate()
|
||||
self.play(self.append_sword)
|
||||
|
||||
|
|
Loading…
Reference in New Issue