Refactoring

This commit is contained in:
2026-01-07 22:09:56 -06:00
parent fff088a0a7
commit b7716201d8
62 changed files with 110 additions and 78 deletions

View File

@@ -4,13 +4,29 @@ 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:
return false
if entity.interactType == Entity.InteractType.NONE:
return
return false
print("Entity Interacted")
if entity.interactType == Entity.InteractType.CONVERSATION:
if entity.conversation.size() == 0:
return false
return true
func _onConversationInteract(_other:Entity) -> void:
print("Starting conversation with ", entity.name)
pass
func onInteract(other:Entity) -> void:
if entity.interactType == Entity.InteractType.NONE:
return
match entity.interactType:
Entity.InteractType.CONVERSATION:
_onConversationInteract(other)
return
_:
pass