Add quest objectives to quest menu
This commit is contained in:
@@ -2,3 +2,26 @@ class_name Quest extends Node
|
||||
|
||||
@export var questName:String = "Some quest"
|
||||
@export var questKey:QuestSystem.QuestKey = QuestSystem.QuestKey.TEST_QUEST
|
||||
|
||||
var questStarted:bool = false
|
||||
var questComplete:bool = false
|
||||
|
||||
var objectives:Array[QuestObjective]
|
||||
|
||||
func _ready() -> void:
|
||||
objectives = []
|
||||
for child in get_children():
|
||||
if child is QuestObjective:
|
||||
objectives.append(child)
|
||||
|
||||
func start() -> void:
|
||||
questStarted = true
|
||||
questComplete = false
|
||||
QUEST.questStarted.emit(questKey)
|
||||
QUEST.questUpdated.emit(questKey)
|
||||
|
||||
func isCompleted() -> bool:
|
||||
return questComplete
|
||||
|
||||
func isStarted() -> bool:
|
||||
return questStarted
|
||||
|
Reference in New Issue
Block a user