Some changes

This commit is contained in:
2026-06-11 19:59:31 -05:00
parent 2f2ea060b1
commit eec429147b
150 changed files with 16615 additions and 262 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ var button := func():
# Interaction settings
@export_category("Interactions")
@export var interactType:InteractType = InteractType.NONE
@export var conversation:Array[ConversationResource] = []
@export var dialogueResource:DialogueResource = null
@export var dialogueTitle:String = "start"
@export var oneTimeItem:ItemResource = null
@export var cutscene:CutsceneResource = null
+11 -7
View File
@@ -1,5 +1,6 @@
class_name EntityInteractableArea extends Area3D
const ItemAction = preload("res://cutscene/item/ItemAction.gd")
const DialogueAction = preload("res://cutscene/dialogue/DialogueAction.gd")
@export var entity:Entity
@@ -11,9 +12,7 @@ func isInteractable() -> bool:
return false
if entity.interactType == Entity.InteractType.CONVERSATION:
if entity.conversation.size() == 0:
return false
return true
return entity.dialogueResource != null
if entity.interactType == Entity.InteractType.CUTSCENE:
if entity.cutscene == null:
@@ -33,12 +32,17 @@ func isInteractable() -> bool:
if entity.interactType == Entity.InteractType.BATTLE_TEST:
return true
return false
func _onConversationInteract(_other:Entity) -> void:
assert(entity.dialogueResource != null)
var cutscene:Cutscene = Cutscene.new()
cutscene.addConversation(entity.conversation)
cutscene.addCallable(DialogueAction.getDialogueCallable(
entity.dialogueResource,
entity.dialogueTitle,
[entity]
))
cutscene.start()
func _onItemInteract(_other:Entity) -> void:
@@ -51,7 +55,7 @@ func _onItemInteract(_other:Entity) -> void:
func onInteract(other:Entity) -> void:
if entity.interactType == Entity.InteractType.NONE:
return
match entity.interactType:
Entity.InteractType.CONVERSATION:
_onConversationInteract(other)
@@ -66,7 +70,7 @@ func onInteract(other:Entity) -> void:
entity.cutscene.queue(cutscene)
cutscene.start()
return
Entity.InteractType.BATTLE_TEST:
var testEnemy = BattleFighter.new({
'controller': BattleFighter.FighterController.AI