separate data and logic setup
This commit is contained in:
parent
6d3ec7ef29
commit
237e3484cd
|
@ -0,0 +1,43 @@
|
|||
extends Node
|
||||
|
||||
# default game config
|
||||
const DEFAULT_CHARS_PER_SECOND = 32
|
||||
|
||||
# voices for characters
|
||||
const brain_voice = null
|
||||
const arborator_voice = null
|
||||
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
||||
const Scenes = {
|
||||
|
||||
# MENUS
|
||||
MAIN_MENU = "res://menus/main_menu.tscn",
|
||||
OPTIONS_MENU = "res://menus/options_menu.tscn",
|
||||
|
||||
# GAME
|
||||
INTRO = "res://scenes/intro.tscn",
|
||||
FIRST_SCENE = "res://scenes/first_scene.tscn"
|
||||
|
||||
}
|
||||
|
||||
const Themes = {
|
||||
|
||||
}
|
||||
|
||||
const Images = {
|
||||
INTRO_BG = "res://img/intro_bg.png"
|
||||
}
|
54
game.gd
54
game.gd
|
@ -1,10 +1,16 @@
|
|||
extends Node
|
||||
|
||||
# generic game globals
|
||||
const Data = preload("res://data.gd")
|
||||
|
||||
# pull them into Game too
|
||||
const DEFAULT_CHARS_PER_SECOND = Data.DEFAULT_CHARS_PER_SECOND
|
||||
const Characters = Data.Characters
|
||||
const Images = Data.Images
|
||||
const Scenes = Data.Scenes
|
||||
const Themes = Data.Themes
|
||||
|
||||
# generic game config 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
|
||||
|
@ -26,44 +32,8 @@ onready var sfx_player = get_node("sfx_player")
|
|||
# transition node
|
||||
onready var transition = get_node("trans_layer/transition")
|
||||
|
||||
# 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,
|
||||
}
|
||||
}
|
||||
|
||||
const Scenes = {
|
||||
|
||||
# MENUS
|
||||
MAIN_MENU = "res://menus/main_menu.tscn",
|
||||
OPTIONS_MENU = "res://menus/options_menu.tscn",
|
||||
|
||||
# GAME
|
||||
INTRO = "res://scenes/intro.tscn",
|
||||
FIRST_SCENE = "res://scenes/first_scene.tscn"
|
||||
|
||||
}
|
||||
|
||||
const Themes = {}
|
||||
|
||||
const Images = {
|
||||
INTRO_BG = "res://img/intro_bg.png"
|
||||
}
|
||||
# actual game state here
|
||||
var current_registry
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue