Csatakezdés hang
This commit is contained in:
BIN
res/sfx/encounter.wav
Normal file
BIN
res/sfx/encounter.wav
Normal file
Binary file not shown.
@@ -12,5 +12,6 @@ sprites = {
|
||||
}
|
||||
|
||||
sounds = {
|
||||
"mus_fnafsux": pygame.mixer.Sound("res/mus/fnafsux.wav")
|
||||
"mus_fnafsux": pygame.mixer.Sound("res/mus/fnafsux.wav"),
|
||||
"sfx_encounter": pygame.mixer.Sound("res/sfx/encounter.wav")
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import assets
|
||||
import arcade
|
||||
import controls
|
||||
import gamestate
|
||||
@@ -12,12 +13,14 @@ overworld = OverworldMap()
|
||||
|
||||
btrans_active = False
|
||||
btrans_timer = 0
|
||||
btrans_sound = None
|
||||
BTRANS_PULSE_DUR = 0.25
|
||||
BTRANS_DURATION = 0.75
|
||||
|
||||
def start_battle(battle_id):
|
||||
global btrans_active, btrans_timer
|
||||
global btrans_active, btrans_timer, btrans_sound
|
||||
gamestate.gamestates["battle"].battle_id = battle_id
|
||||
btrans_sound = assets.sounds["sfx_encounter"].play()
|
||||
btrans_active = True
|
||||
btrans_timer = 0
|
||||
|
||||
@@ -31,6 +34,7 @@ def update(game, dt):
|
||||
|
||||
if btrans_timer >= BTRANS_DURATION:
|
||||
game.mos_enabled = False
|
||||
btrans_sound.stop()
|
||||
gamestate.switch_gamestate(game,"battle")
|
||||
|
||||
game.mos_enabled = True
|
||||
|
||||
Reference in New Issue
Block a user