Fixed up a couple things, first steps towards a location manager
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
class_name cLocation
|
||||
|
||||
var locationGraph = Global.locations
|
||||
|
||||
var locationGraph: Dictionary
|
||||
var location: Dictionary
|
||||
var locationID: String
|
||||
|
||||
var id: int
|
||||
var name: String
|
||||
var connections: Array
|
||||
|
||||
@@ -18,14 +17,12 @@ var yoshida = enemyTemplate.duplicate()
|
||||
var akers = enemyTemplate.duplicate()
|
||||
var flesher = enemyTemplate.duplicate()
|
||||
|
||||
func _init(id: String):
|
||||
# Set immediate values
|
||||
locationID = id
|
||||
print(locationGraph)
|
||||
print(id)
|
||||
location = locationGraph.get(id)
|
||||
func _init(locationID: int, graph: Dictionary):
|
||||
locationGraph = graph
|
||||
id = locationID
|
||||
|
||||
# Set Fields
|
||||
location = locationGraph.get(str(id))
|
||||
|
||||
name = location.get("name")
|
||||
connections = location.get("connections")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user