Drive planets from definitions
This commit is contained in:
parent
2f68515f33
commit
02643c76c4
22 changed files with 183 additions and 82 deletions
14
PlanetDefinitions.gd
Normal file
14
PlanetDefinitions.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name PlanetDefinitions
|
||||
extends RefCounted
|
||||
|
||||
const ROCKY_ID: String = "rocky"
|
||||
const GAS_GIANT_ID: String = "gas_giant"
|
||||
const DEFAULT_DEFINITION_ID: String = ROCKY_ID
|
||||
const DEFINITIONS: Dictionary = {
|
||||
ROCKY_ID: preload("res://RockyPlanetDefinition.tres"),
|
||||
GAS_GIANT_ID: preload("res://GasGiantDefinition.tres"),
|
||||
}
|
||||
|
||||
|
||||
static func get_definition(definition_id: String) -> Resource:
|
||||
return DEFINITIONS.get(definition_id, DEFINITIONS[DEFAULT_DEFINITION_ID])
|
||||
Loading…
Reference in a new issue