feat(credits): enable music volume, closes #89
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
# `music_enable`
|
||||||
|
#
|
||||||
|
# Enable music volume
|
||||||
|
#
|
||||||
|
# @ESC
|
||||||
|
extends ESCBaseCommand
|
||||||
|
class_name MusicEnableCommand
|
||||||
|
|
||||||
|
|
||||||
|
var item_count_manager = ESCItemCountManager.new()
|
||||||
|
|
||||||
|
# Return the descriptor of the arguments of this command
|
||||||
|
func configure() -> ESCCommandArgumentDescriptor:
|
||||||
|
return ESCCommandArgumentDescriptor.new()
|
||||||
|
|
||||||
|
|
||||||
|
# Validate wether the given arguments match the command descriptor
|
||||||
|
func validate(arguments: Array):
|
||||||
|
return .validate(arguments)
|
||||||
|
|
||||||
|
|
||||||
|
# Run the command
|
||||||
|
func run(command_params: Array) -> int:
|
||||||
|
AudioServer.set_bus_volume_db(
|
||||||
|
AudioServer.get_bus_index(escoria.BUS_MUSIC),
|
||||||
|
linear2db(
|
||||||
|
ESCProjectSettingsManager.get_setting(
|
||||||
|
ESCProjectSettingsManager.MUSIC_VOLUME
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
escoria.game_scene.musicEnabled = true
|
||||||
|
|
||||||
|
return ESCExecution.RC_OK
|
||||||
|
|
||||||
|
|
||||||
|
# Function called when the command is interrupted.
|
||||||
|
func interrupt():
|
||||||
|
# Do nothing
|
||||||
|
pass
|
||||||
@@ -17,6 +17,7 @@ say player "Parece un cuerno de algún animal. Lo usan para llamar a comer."
|
|||||||
stop_snd
|
stop_snd
|
||||||
> [turno_cocina_eneko_cata_ok]
|
> [turno_cocina_eneko_cata_ok]
|
||||||
set_gui_visible false
|
set_gui_visible false
|
||||||
|
music_enable
|
||||||
change_scene res://gymkhana/rooms/turno_cocina/creditos/creditos.tscn
|
change_scene res://gymkhana/rooms/turno_cocina/creditos/creditos.tscn
|
||||||
stop
|
stop
|
||||||
play_video res://gymkhana/videos/turno_cocina/cuerno_antes_de_tiempo.ogv
|
play_video res://gymkhana/videos/turno_cocina/cuerno_antes_de_tiempo.ogv
|
||||||
|
|||||||
@@ -550,6 +550,11 @@ _global_script_classes=[ {
|
|||||||
"path": "res://addons/escoria-ui-return-monkey-island/item_outline.gd"
|
"path": "res://addons/escoria-ui-return-monkey-island/item_outline.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "ESCBaseCommand",
|
"base": "ESCBaseCommand",
|
||||||
|
"class": "MusicEnableCommand",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://addons/escoria-ui-return-monkey-island/esc/commands/music_enable.gd"
|
||||||
|
}, {
|
||||||
|
"base": "ESCBaseCommand",
|
||||||
"class": "PlayLibSound",
|
"class": "PlayLibSound",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://addons/escoria-ui-return-monkey-island/esc/commands/play_lib_snd.gd"
|
"path": "res://addons/escoria-ui-return-monkey-island/esc/commands/play_lib_snd.gd"
|
||||||
@@ -892,7 +897,8 @@ _global_script_class_icons={
|
|||||||
"InventoryAddCommand": "",
|
"InventoryAddCommand": "",
|
||||||
"InventoryRemoveCommand": "",
|
"InventoryRemoveCommand": "",
|
||||||
"ItemCountAddCommand": "",
|
"ItemCountAddCommand": "",
|
||||||
"ItemOutline": "res://addons/escoria-core/design/esc_item.svg",
|
"ItemOutline": "",
|
||||||
|
"MusicEnableCommand": "",
|
||||||
"PlayLibSound": "",
|
"PlayLibSound": "",
|
||||||
"PlaySndCommand": "",
|
"PlaySndCommand": "",
|
||||||
"PlayVideoCommand": "",
|
"PlayVideoCommand": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user