Whatever lol
This commit is contained in:
16
overworld/entity/EntityInteractableArea.gd
Normal file
16
overworld/entity/EntityInteractableArea.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
class_name EntityInteractableArea extends Area3D
|
||||
const Entity = preload("res://overworld/entity/Entity.gd")
|
||||
|
||||
@export var entity:Entity
|
||||
|
||||
func isInteractable() -> bool:
|
||||
return entity && entity.interactType != Entity.InteractType.NONE
|
||||
|
||||
func onInteract() -> void:
|
||||
if !isInteractable():
|
||||
return
|
||||
|
||||
if entity.interactType == Entity.InteractType.NONE:
|
||||
return
|
||||
|
||||
print("Entity Interacted")
|
||||
Reference in New Issue
Block a user