1
0
Fork 0

bugfix: savestation colliding with itself

This commit is contained in:
Felipe M 2021-05-22 18:48:24 +02:00
parent c5a54977ac
commit b0c5798328
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
3 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ const save_path = "user://savegame.save"
var is_loading = false
func save_game():
print("Saving game")
var save_game = File.new()
save_game.open(save_path, File.WRITE)
var persistingNodes = get_tree().get_nodes_in_group("Persists")

View File

@ -3,5 +3,6 @@ extends StaticBody2D
onready var animation = $Animation
func _on_SaveArea_body_entered(_body):
print(_body)
animation.play("Save")
SaverLoader.save_game()

View File

@ -37,6 +37,7 @@ tracks/1/keys = {
}
[node name="SaveStation" type="StaticBody2D"]
collision_layer = 0
script = ExtResource( 2 )
[node name="WhiteSpaceSprite" type="Sprite" parent="."]