beta-1.0
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
extends Area2D
|
||||
class_name InteractScanner
|
||||
|
||||
signal InteractionActionTriggered()
|
||||
|
||||
@export var parent: Node2D
|
||||
@export var direction_component: FacingDirectionComponent
|
||||
@export var disable_interactions := false
|
||||
|
||||
# Public Methods
|
||||
func OnDirectionChanged() -> void:
|
||||
@@ -14,3 +18,11 @@ func OnDirectionChanged() -> void:
|
||||
parent.rotation = deg_to_rad(180)
|
||||
else:
|
||||
parent.rotation = deg_to_rad(0)
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if disable_interactions:
|
||||
return
|
||||
if Input.is_action_just_pressed("player_interact"):
|
||||
InputManager.IgnoreAction("player_interact")
|
||||
InteractionActionTriggered.emit()
|
||||
|
||||
Reference in New Issue
Block a user