added basic scene manager
This commit is contained in:
parent
f694d5c4f8
commit
2cf0846597
7 changed files with 37 additions and 57 deletions
|
|
@ -28,7 +28,7 @@ var level: int = 1
|
|||
var xp: int = 1
|
||||
|
||||
|
||||
# the ID is the filename of the monster from res://resources/monsters/<filename>.tres
|
||||
# the ID is the filename of the monster from res://entities/monsters/<filename>.tres
|
||||
func set_data(p_unique_id = "", current_values: Dictionary = {}, p_level: int = 1) -> void:
|
||||
if p_unique_id.is_empty():
|
||||
printerr("Monster.gd: No ID given")
|
||||
|
|
@ -59,7 +59,7 @@ func set_data(p_unique_id = "", current_values: Dictionary = {}, p_level: int =
|
|||
|
||||
func load_base_monster_data(p_unique_id):
|
||||
var path = "res://resources/monsters/" + p_unique_id + ".tres"
|
||||
if FileAccess.file_exists(path):
|
||||
if ResourceLoader.exists(path):
|
||||
var base_monster = load(path)
|
||||
return base_monster
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue