Add battle stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class_name EntityInteractableArea extends Area3D
|
||||
# const BattleStartAction = preload("res://cutscene/battle/BattleStartAction.gd")
|
||||
|
||||
@export var entity:Entity
|
||||
|
||||
@@ -10,13 +11,18 @@ func isInteractable() -> bool:
|
||||
return false
|
||||
|
||||
if entity.interactType == Entity.InteractType.CONVERSATION:
|
||||
if entity.conversation.size() == 0:
|
||||
return false
|
||||
if entity.conversation.size() != 0:
|
||||
return true
|
||||
|
||||
if entity.interactType == Entity.InteractType.TEST_BATTLE:
|
||||
return true
|
||||
|
||||
return true
|
||||
return false
|
||||
|
||||
func _onConversationInteract(_other:Entity) -> void:
|
||||
CUTSCENE.setConversation(entity.conversation)
|
||||
var cutscene:Cutscene = Cutscene.new()
|
||||
cutscene.addConversation(entity.conversation)
|
||||
cutscene.start()
|
||||
|
||||
func onInteract(other:Entity) -> void:
|
||||
if entity.interactType == Entity.InteractType.NONE:
|
||||
@@ -26,5 +32,14 @@ func onInteract(other:Entity) -> void:
|
||||
Entity.InteractType.CONVERSATION:
|
||||
_onConversationInteract(other)
|
||||
return
|
||||
|
||||
Entity.InteractType.TEST_BATTLE:
|
||||
var cutscene:Cutscene = Cutscene.new()
|
||||
cutscene.addCallable(BattleStartAction.getStartBattleCallable({
|
||||
BATTLE.BattlePosition.RIGHT_TOP_FRONT: PartySingleton.PARTY_JOHN,
|
||||
}))
|
||||
cutscene.start()
|
||||
return
|
||||
|
||||
_:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user