reorganization
This commit is contained in:
parent
6ecd0a57b1
commit
6d3ec7ef29
40
game.gd
40
game.gd
|
@ -1,30 +1,31 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
# globals, for the game
|
# generic game globals
|
||||||
var reading_speed = 1.0
|
|
||||||
|
|
||||||
var game_started = false setget _on_game_started_set
|
var game_started = false setget _on_game_started_set
|
||||||
|
|
||||||
var current_registry
|
var current_registry
|
||||||
|
|
||||||
|
var reading_speed = 1.0 setget _on_set_reading_speed
|
||||||
|
var master_vol = 50 setget _on_set_master_vol
|
||||||
|
var music_vol = 50 setget _on_set_music_vol
|
||||||
|
var sfx_vol = 50 setget _on_set_sfx_vol
|
||||||
|
|
||||||
|
# options state
|
||||||
|
signal on_reading_speed_changed(new_value)
|
||||||
|
signal on_master_volume_changed(new_value)
|
||||||
|
signal on_music_volume_changed(new_value)
|
||||||
|
signal on_sfx_volume_changed(new_value)
|
||||||
|
|
||||||
|
signal on_settings_enter()
|
||||||
|
signal on_settings_exit()
|
||||||
|
|
||||||
# music related
|
# music related
|
||||||
onready var music_player = get_node("music_player")
|
onready var music_player = get_node("music_player")
|
||||||
onready var sfx_player = get_node("sfx_player")
|
onready var sfx_player = get_node("sfx_player")
|
||||||
|
|
||||||
var master_vol setget _on_set_master_vol
|
|
||||||
var music_vol setget _on_set_music_vol
|
|
||||||
var sfx_vol setget _on_set_sfx_vol
|
|
||||||
|
|
||||||
# transition node
|
# transition node
|
||||||
onready var transition = get_node("trans_layer/transition")
|
onready var transition = get_node("trans_layer/transition")
|
||||||
|
|
||||||
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()
|
|
||||||
|
|
||||||
# voices for characters
|
# voices for characters
|
||||||
const brain_voice = null
|
const brain_voice = null
|
||||||
const arborator_voice = null
|
const arborator_voice = null
|
||||||
|
@ -64,6 +65,9 @@ const Images = {
|
||||||
INTRO_BG = "res://img/intro_bg.png"
|
INTRO_BG = "res://img/intro_bg.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
||||||
|
|
||||||
func _register_functions():
|
func _register_functions():
|
||||||
|
|
||||||
# default VN.. functions
|
# default VN.. functions
|
||||||
|
@ -89,6 +93,9 @@ func _on_game_started_set(v):
|
||||||
_on_game_start()
|
_on_game_start()
|
||||||
game_started = v
|
game_started = v
|
||||||
|
|
||||||
|
func _on_set_reading_speed(s):
|
||||||
|
pass
|
||||||
|
|
||||||
func _on_set_master_vol(v):
|
func _on_set_master_vol(v):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -102,7 +109,7 @@ func _on_game_start():
|
||||||
|
|
||||||
# all game state here
|
# all game state here
|
||||||
current_registry = {}
|
current_registry = {}
|
||||||
print("YAH")
|
|
||||||
# register all de stuff
|
# register all de stuff
|
||||||
_register_functions()
|
_register_functions()
|
||||||
|
|
||||||
|
@ -121,6 +128,3 @@ func switch_scene_to(scene_path, fade = true):
|
||||||
if SceneSwitcher.current_scene.has_method("on_scene_start"):
|
if SceneSwitcher.current_scene.has_method("on_scene_start"):
|
||||||
SceneSwitcher.current_scene.on_scene_start()
|
SceneSwitcher.current_scene.on_scene_start()
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
pass
|
|
Loading…
Reference in New Issue