godot-vn/game.gd

59 lines
1.0 KiB
GDScript3
Raw Normal View History

2018-09-21 02:43:57 +01:00
extends Node
# globals, for the game
var reading_speed = 1.0
var game_started = false setget _on_game_started_set
var current_registry
# music related
onready var music_player = get_node("music_player")
onready var sfx_player = get_node("sfx_player")
signal on_music_volume_changed(new_value)
signal on_sfx_volume_changed(new_value)
signal on_reading_speed_changed(new_value)
signal on_settings_enter()
signal on_settings_exit()
const Themes = {}
# voices for characters
const brain_voice = null
const arborator_voice = null
const DEFAULT_CHARS_PER_SECOND = 32
const Characters = {
BRAIN = {
name = "~brain~",
name_colour = Color(1, 1, 1, 1),
voice = brain_voice,
talking_speed = 1.0,
},
ARBORATOR = {
name = "arborator",
name_colour = Color(1, 1, 1, 1),
voice = arborator_voice,
talking_speed = 1.0,
}
}
func _register_functions():
pass
func _on_game_started_set(v):
if v and not game_started:
_on_game_start()
game_started = v
func _on_game_start():
# all game state here
current_registry = {}
func _ready():
pass