feat: add ice block variant; add button variant;

This commit is contained in:
2026-09-19 14:06:51 +02:00
parent 4234167cc1
commit 5b7c474f32
13 changed files with 143 additions and 29 deletions
+3 -10
View File
@@ -2,16 +2,7 @@ extends Area2D
var bodies_on_top = 0
signal pressed
signal unpressed
# 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
@export var is_single_use: bool = false
func _on_body_entered(body: Node2D) -> void:
bodies_on_top = bodies_on_top + 1
@@ -21,6 +12,8 @@ func _on_body_entered(body: Node2D) -> void:
func _on_body_exited(body: Node2D) -> void:
if is_single_use:
return
bodies_on_top = bodies_on_top - 1
if (body.is_in_group("pushable") or body is Player) and bodies_on_top == 0:
$AnimatedSprite2D.play("unpressed")