feat: add new npc node; add interactable group to the project; add intreactable area to the player;
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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
|
||||
Reference in New Issue
Block a user