Lots of work on saving, enemies and object positions are now saved
This commit is contained in:
@@ -11,7 +11,7 @@ var gun_already_held = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
add_to_group("persist")
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -32,3 +32,16 @@ func picked_up():
|
||||
level_control.player.gun.anim_player.play("swap_out")
|
||||
level_control.gun_spawn(weapon_id)
|
||||
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