in-world ui textboxes
This commit is contained in:
@@ -33,15 +33,19 @@ func isInteractable() -> bool:
|
||||
if entity.interactType == Entity.InteractType.BATTLE_TEST:
|
||||
return true
|
||||
|
||||
if entity.interactType == Entity.InteractType.CHATBOX:
|
||||
return entity.chatboxMessage != ""
|
||||
|
||||
return false
|
||||
|
||||
func _onConversationInteract(_other:Entity) -> void:
|
||||
func _onConversationInteract(other:Entity) -> void:
|
||||
assert(entity.dialogueResource != null)
|
||||
var cutscene:Cutscene = Cutscene.new()
|
||||
cutscene.addCallable(DialogueAction.getDialogueCallable(
|
||||
entity.dialogueResource,
|
||||
entity.dialogueTitle,
|
||||
[entity]
|
||||
[entity],
|
||||
{"npc": entity, "player": other}
|
||||
))
|
||||
cutscene.start()
|
||||
|
||||
@@ -83,5 +87,11 @@ func onInteract(other:Entity) -> void:
|
||||
cutscene.start()
|
||||
return
|
||||
|
||||
Entity.InteractType.CHATBOX:
|
||||
assert(entity.chatboxMessage != "")
|
||||
var chatbox:WorldChatBox = UI.spawnWorldChatBox(entity)
|
||||
chatbox.showAdvanceable(entity.chatboxMessage)
|
||||
return
|
||||
|
||||
_:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user