You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ============================================================================ ##region Public methods## Plays a child [AudioStreamPlayer].funcplay_sound(audio_stream_name: StringName) ->void:
varaudio_stream_player: AudioStreamPlayer=get_node("%s"% audio_stream_name)
ifaudio_stream_player:
audio_stream_player.play()
## Plays a child [AudioStreamPlayer2D].funcplay_sound_2d(audio_stream_name: StringName, position: Vector2, global: bool=true) ->void:
varaudio_stream_player: AudioStreamPlayer2D=get_node("%s"% audio_stream_name)
ifaudio_stream_player:
ifglobal:
audio_stream_player.global_position=positionelse:
audio_stream_player.position=positionaudio_stream_player.play()
#endregion# ============================================================================ #
@yoantran: Refactor .gdshader files to use spaces instead of tabs for indenting.
@miketvo: Fix incorrect value in default_bus_layout.tres: Bus Gameplay should be routed to GlobalEffects.
@miketvo: Update the signature of State overridable methods to have game_state_data = null default value.
@miketvo: Update ssssss/scripts/scenes/level_select/level_select.gd to also detect duplicated level .remap files as follow:
func_load_levels() ->Error:
...
levels=level_dir_list.filter(
func (file_name: String): return (
file_name.ends_with(".tscn") orfile_name.ends_with(".scn")
)
)
# Remove duplicates using a set (Dictionary), in case some scenes are# exported as both 'scene.tscn' and 'scene.tscn.remap', which after trimming# 'remap' will leaves duplications.varfile_names: Dictionary= {}
forfile_nameinlevels:
file_names[file_name] =nulllevels=Array(file_names.keys(), TYPE_STRING, &"", null)
levels=Array(levels.map(
func (level_filename): returnLEVEL_DIRECTORY.path_join(level_filename)
), TYPE_STRING, &"", null)
...
.connect("
).SfxController
as follow:.gdshader
files to use spaces instead of tabs for indenting.default_bus_layout.tres
: BusGameplay
should be routed toGlobalEffects
.State
overridable methods to havegame_state_data = null
default value.ssssss/scripts/scenes/level_select/level_select.gd
to also detect duplicated level.remap
files as follow:Convention:
feature/70-more-code-cleaning
.[70-more-code-cleaning] <msg here>
.The text was updated successfully, but these errors were encountered: