summaryrefslogtreecommitdiff
path: root/Stages/Goal/goal.gd
blob: 934a071ecf5efa961360a0d4657988cf0d1cfa4a (plain)
1
2
3
4
5
6
7
8
9
10
extends Node2D


func _ready() -> void:
	$AnimatedSprite.play("default")


func _on_area_2d_body_entered(body: Node2D) -> void:
	if body is Unit:
		body.enter_goal($GoalCenter.global_position)