started work on save structures and data validation

This commit is contained in:
derek
2025-02-26 13:19:34 -06:00
parent bd991c21c9
commit 45246a6098
14 changed files with 108 additions and 50 deletions

View File

@@ -60,9 +60,9 @@ func _ready():
refresh_scene()
#Spawn Crown
if SaveLoad.last_hit_path:
if GameGlobals.last_hit_path:
var crown_spawn = crown.instantiate()
var crown_target = get_node(SaveLoad.last_hit_path)
var crown_target = get_node(GameGlobals.last_hit_path)
if crown_target:
crown_target.add_child(crown_spawn)
crown_spawn.position = Vector3(0,2,0)
@@ -162,7 +162,7 @@ func die():
instance_dead.transform.basis = player.global_transform.basis
if last_hit != null:
instance_dead.target = last_hit
SaveLoad.last_hit_path = str(last_hit.get_path())
GameGlobals.last_hit_path = str(last_hit.get_path())
instance_dead.target_type = target_type
instance_dead.respawn_position = respawn_position
instance_dead.respawn_rotation = respawn_cam_rotation