added docs section and tweaks to chest spawning
This commit is contained in:
@@ -13,6 +13,15 @@ func _on_player_detect_body_entered(body: Node3D) -> void:
|
||||
if open and active:
|
||||
anim_player.play("close")
|
||||
open = false
|
||||
|
||||
if body is Chest:
|
||||
if !body.claimed:
|
||||
body.claimed = true
|
||||
var old_pos = body.global_position
|
||||
body.get_parent().remove_child(body)
|
||||
get_tree().current_scene.add_child(body)
|
||||
body.global_position = old_pos
|
||||
|
||||
|
||||
func _on_switch_1_switch_changed() -> void:
|
||||
if open:
|
||||
|
||||
Reference in New Issue
Block a user