\$\begingroup\$

i got this error identifier “GameManager” is not declared in the current scope

extends Node2D

class_name Checkpoint

@export var spwanpoint = false

var activated = false


func activate():
    GameManager.current_checkpoint = self
    activated = true
    $AnimationPlayer.play("activated")


func _on_area_2d_area_entered(area):
    if area.get_parent() is Player && !activated:
        activate()

\$\endgroup\$

You must log in to answer this question.

Browse other questions tagged .