Fixing bug

This commit is contained in:
Jonathan Herrewijnen 2022-10-13 17:35:43 +02:00
parent 645b252da9
commit 4d6ac271c0
3 changed files with 8 additions and 13 deletions

View File

@ -1,5 +1,5 @@
extends Node2D
const gamevariables = "res://MiscScenes/GameVariables.tscn"
const game_variables = "res://MiscScenes/GameVariables.tscn"
func RenderSpeech(load_on, text):
var speech = preload("res://MiscScenes/Speech.tscn").instance()
@ -8,7 +8,7 @@ func RenderSpeech(load_on, text):
load_on.add_child(speech)
func SoundOnInteraction(load_on, sound_name):
var audio = preload(gamevariables).instance().get_node("Sound")
audio.stream = load("res://Sounds/%s.wav" % sound_name)
var audio = preload(game_variables).instance()
audio.get_node("Sound").stream = load("res://Sounds/%s.wav" % sound_name)
load_on.add_child(audio)
Global.Log("Sound playing "+sound_name, 1)

View File

@ -1,10 +0,0 @@
[gd_resource type="AudioBusLayout" format=2]
[resource]
bus/0/solo = true
bus/1/name = "New Bus"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = 6.02
bus/1/send = "Master"

View File

@ -24,12 +24,17 @@ config/name="Ring of Races demo"
run/main_scene="res://MiscScenes/Menu.tscn"
config/icon="res://pictures/gui/buttons/delete_ringofraces.png"
[audio]
default_bus_layout=""
[autoload]
Global="*res://Global.gd"
Database="*res://Storage/Database.gd"
GlobalStructures="*res://Global_structures.gd"
GlobalGameFunctions="*res://Global_InGame.gd"
GameVariables="*res://MiscScenes/GameVariables.tscn"
[display]