Readonly
Planned
isWhether the system is ready.
Readonly
Planned
questsThe information of all quests.
Planned
Add a new quest.
The name of the quest.
Optional
options: { Optional parameters.
Optional
description?: stringThe description of the quest.
Optional
onCallback function triggered when the quest is completed.
The quest object.
const quest = questService.addQuest(
'Quest 1',
{
description: 'This is a quest.',
onCompleted: () => console.log('Quest 1 is completed.')
}
);
quest.addCheckTask('Task 1: Move', {onCompleted: () => console.log('Task 1 is completed.')});
quest.addProgressBarTask('Task 2: Jump 3 times', 3, {onCompleted: () => console.log('Task 2 is completed.')});
quest.start();
Send a specific event.
Event name
Optional
Rest
...args: any[]Event parameters
Unsubscribe from a specific event.
Event name.
Callback function.
Subscribe to a specific event.
Event name.
Callback function.
Define QuestService interface.