12 lines
338 B
GDScript
12 lines
338 B
GDScript
extends StaticBody2D
|
|
|
|
var can_interact: bool = false
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
if Input.is_action_just_pressed("Interact") and can_interact:
|
|
if $CanvasLayer.visible == false:
|
|
$CanvasLayer.visible = true
|
|
else:
|
|
$CanvasLayer.visible = false
|