Event Go To
This commit is contained in:
@@ -10,6 +10,8 @@ class_name EventConversation extends "res://scripts/Event/Flow/EventGroup.gd"
|
||||
@export var turnInteractee:bool = true
|
||||
@export var turnInteractor:bool = true
|
||||
|
||||
var endPauseEvent:EventPause = null
|
||||
|
||||
func start() -> void:
|
||||
# Turn events
|
||||
if interactee && interactor:
|
||||
@@ -37,14 +39,20 @@ func start() -> void:
|
||||
addExtraEvent(startPause, 0)
|
||||
|
||||
# Create end pause event.
|
||||
var endPause = EventPause.new()
|
||||
endPause.pauseType = endPauseType
|
||||
endPause.entities = entities
|
||||
endPauseEvent = EventPause.new()
|
||||
endPauseEvent.pauseType = endPauseType
|
||||
endPauseEvent.entities = entities
|
||||
if pauseInteractee && interactee.entity:
|
||||
endPause.includeInteractee = pauseInteractee
|
||||
endPauseEvent.includeInteractee = pauseInteractee
|
||||
if pauseInteractor && interactor.entity:
|
||||
endPause.includeInteractor = pauseInteractor
|
||||
addExtraEvent(endPause, -1)
|
||||
endPauseEvent.includeInteractor = pauseInteractor
|
||||
addExtraEvent(endPauseEvent, -1)
|
||||
|
||||
# Pass off to event group
|
||||
super.start()
|
||||
|
||||
func end() -> void:
|
||||
# Manually end pause
|
||||
if endPauseEvent != null && !endPauseEvent.started:
|
||||
endPauseEvent.start()
|
||||
super.end()
|
||||
|
Reference in New Issue
Block a user