capri/objects/ice/ice.gd
2025-03-01 19:49:37 -05:00

20 lines
440 B
GDScript

extends Node2D
# 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_area_2d_body_entered(body: Node2D) -> void:
if body is Player:
body.ices_touched += 1
func _on_area_2d_body_exited(body: Node2D) -> void:
body.ices_touched -= 1