Rewrote entity system

This commit is contained in:
2025-05-09 22:33:51 -05:00
parent a69ec56a2d
commit f465880044
29 changed files with 372 additions and 284 deletions

View File

@@ -13,12 +13,13 @@ func _ready() -> void:
for child in get_children():
if child is QuestObjective:
objectives.append(child)
child.onQuestReady(self)
func start() -> void:
questStarted = true
questComplete = false
QUEST.questStarted.emit(questKey)
QUEST.questUpdated.emit(questKey)
QUEST.questStarted.emit(self)
QUEST.questUpdated.emit(self)
func isCompleted() -> bool:
return questComplete

View File

@@ -1,7 +1,13 @@
class_name QuestObjective extends Node
# enum Type {
# }
enum Type {
Item,
}
@export var objectiveName:String = "Some objective"
# @export var objectiveType:Type = Type.Item
@export var objectiveType:Type = Type.Item
var quest:Quest
func onQuestReady(quest:Quest) -> void:
self.quest = quest