refactorisation du QuestSystem
This commit is contained in:
parent
2370cb670d
commit
5fa20c954c
11 changed files with 128 additions and 39 deletions
|
|
@ -29,11 +29,29 @@ namespace Decor.Runtime
|
|||
|
||||
void Start()
|
||||
{
|
||||
//UpdateParchmentState();
|
||||
Info($"<color=yellow>Il y a actuellement {_quests} quêtes affichés sur le Panneau</color>");
|
||||
// Trigger an initial refresh
|
||||
QuestManager.Instance.NotifyAvailableQuestsUpdated(_player.GuildLevel);
|
||||
UpdateParchmentState();
|
||||
}
|
||||
|
||||
void Update()
|
||||
void OnEnable()
|
||||
{
|
||||
QuestManager.OnAvailableQuestsUpdated += HandleAvailableChanged;
|
||||
QuestManager.OnQuestCompleted += HandleQuestCompleted;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
QuestManager.OnAvailableQuestsUpdated -= HandleAvailableChanged;
|
||||
QuestManager.OnQuestCompleted -= HandleQuestCompleted;
|
||||
}
|
||||
|
||||
void HandleAvailableChanged(System.Collections.Generic.List<QuestTemplate> _)
|
||||
{
|
||||
UpdateParchmentState();
|
||||
}
|
||||
|
||||
void HandleQuestCompleted(QuestClass _)
|
||||
{
|
||||
UpdateParchmentState();
|
||||
}
|
||||
|
|
@ -66,8 +84,6 @@ namespace Decor.Runtime
|
|||
)
|
||||
);
|
||||
_parchment.SetActive(hasTrulyAvailableQuests);
|
||||
|
||||
Info($"<color=green>Il y a actuellement {hasTrulyAvailableQuests} disponibles</color>");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue