2021-05-28 21:01:56 +00:00
|
|
|
extends Node2D
|
2022-10-11 17:21:46 +00:00
|
|
|
#Global functions for the game, like speech bubbles and sounds
|
2021-05-28 21:01:56 +00:00
|
|
|
|
|
|
|
func RenderSpeech(load_on, text):
|
2021-09-04 15:29:04 +00:00
|
|
|
var speech = preload("res://MiscScenes/Speech.tscn").instance()
|
2021-05-28 21:01:56 +00:00
|
|
|
speech.bubble_text = text
|
|
|
|
speech.set_position(Vector2(0,-40))
|
2021-06-04 20:57:48 +00:00
|
|
|
load_on.add_child(speech)
|
2022-10-11 17:21:46 +00:00
|
|
|
|
|
|
|
func SoundOnInteraction(load_on, sound_name):
|
|
|
|
var audio = preload("res://MiscScenes/Sound.tscn").instance()
|
|
|
|
var format_string = "res://Sounds/%s.wav"
|
|
|
|
var actual_string = format_string % sound_name
|
|
|
|
var Sound = load(actual_string)
|
|
|
|
audio.stream = Sound
|
|
|
|
load_on.add_child(audio)
|