fix: remove the whitespaces and clean up;
This commit is contained in:
@@ -2,23 +2,18 @@ extends Area2D
|
||||
@export var next_scene: String
|
||||
@export var player_spawn_pos: Vector2
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_body_entered(body: Player) -> void:
|
||||
print("body entered!")
|
||||
SceneManager.player_next_scene_spawn_pos = player_spawn_pos
|
||||
get_tree().change_scene_to_file.call_deferred(next_scene)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_body_exited(body: Node2D) -> void:
|
||||
print("player left!")
|
||||
pass # Replace with function body.
|
||||
|
||||
Reference in New Issue
Block a user