reorganization
This commit is contained in:
parent
6ecd0a57b1
commit
6d3ec7ef29
42
game.gd
42
game.gd
|
@ -1,30 +1,31 @@
|
|||
extends Node
|
||||
|
||||
# globals, for the game
|
||||
var reading_speed = 1.0
|
||||
|
||||
# generic game globals
|
||||
var game_started = false setget _on_game_started_set
|
||||
|
||||
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
|
||||
onready var music_player = get_node("music_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
|
||||
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
|
||||
const brain_voice = null
|
||||
const arborator_voice = null
|
||||
|
@ -64,6 +65,9 @@ const Images = {
|
|||
INTRO_BG = "res://img/intro_bg.png"
|
||||
}
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func _register_functions():
|
||||
|
||||
# default VN.. functions
|
||||
|
@ -89,6 +93,9 @@ func _on_game_started_set(v):
|
|||
_on_game_start()
|
||||
game_started = v
|
||||
|
||||
func _on_set_reading_speed(s):
|
||||
pass
|
||||
|
||||
func _on_set_master_vol(v):
|
||||
pass
|
||||
|
||||
|
@ -102,7 +109,7 @@ func _on_game_start():
|
|||
|
||||
# all game state here
|
||||
current_registry = {}
|
||||
print("YAH")
|
||||
|
||||
# register all de stuff
|
||||
_register_functions()
|
||||
|
||||
|
@ -120,7 +127,4 @@ func switch_scene_to(scene_path, fade = true):
|
|||
yield(transition, "on_transition_completed")
|
||||
if SceneSwitcher.current_scene.has_method("on_scene_start"):
|
||||
SceneSwitcher.current_scene.on_scene_start()
|
||||
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
Loading…
Reference in New Issue