Lots of work on saving, enemies and object positions are now saved
This commit is contained in:
@@ -18,6 +18,7 @@ var player
|
||||
func _ready():
|
||||
add_to_group("pickup")
|
||||
add_to_group("spawned")
|
||||
add_to_group("persist")
|
||||
#find player
|
||||
player = level_control.player
|
||||
rand_amt = randi_range(25,100)
|
||||
@@ -69,3 +70,16 @@ func _on_timer_timeout() -> void:
|
||||
collision_shape.disabled = true
|
||||
await get_tree().create_timer(1).timeout
|
||||
self.queue_free()
|
||||
|
||||
func save():
|
||||
var save_dict = {
|
||||
"filename" : get_scene_file_path(),
|
||||
"parent" : get_parent().get_path(),
|
||||
"pos_x" : position.x,
|
||||
"pos_y" : position.y,
|
||||
"pos_z" : position.z,
|
||||
"rot_x" : rotation.x,
|
||||
"rot_y" : rotation.y,
|
||||
"rot_z" : rotation.z
|
||||
}
|
||||
return save_dict
|
||||
|
||||
Reference in New Issue
Block a user