@drincs/nqtr 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{StageProps-W85kcacG.d.mts → StageProps-BP4soUUZ.d.mts} +30 -11
- package/dist/{StageProps-vR-NLl0n.d.ts → StageProps-DVGvhQgr.d.ts} +30 -11
- package/dist/classes/index.d.mts +2 -1
- package/dist/classes/index.d.ts +2 -1
- package/dist/classes/index.js +34 -2
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +34 -2
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/quest/Quest.d.mts +2 -1
- package/dist/classes/quest/Quest.d.ts +2 -1
- package/dist/classes/quest/Quest.js +34 -2
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs +34 -2
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +2 -1
- package/dist/classes/quest/Stage.d.ts +2 -1
- package/dist/classes/quest/Stage.js +10 -2
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs +10 -2
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/QuestDecorator.d.mts +2 -1
- package/dist/decorators/QuestDecorator.d.ts +2 -1
- package/dist/decorators/QuestDecorator.js +34 -2
- package/dist/decorators/QuestDecorator.js.map +1 -1
- package/dist/decorators/QuestDecorator.mjs +34 -2
- package/dist/decorators/QuestDecorator.mjs.map +1 -1
- package/dist/decorators/index.d.mts +2 -1
- package/dist/decorators/index.d.ts +2 -1
- package/dist/decorators/index.js +34 -2
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +34 -2
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/QuestFunctions.d.mts +2 -2
- package/dist/functions/QuestFunctions.d.ts +2 -2
- package/dist/functions/QuestFunctions.js.map +1 -1
- package/dist/functions/QuestFunctions.mjs.map +1 -1
- package/dist/functions/RoutineFunctions.js.map +1 -1
- package/dist/functions/RoutineFunctions.mjs.map +1 -1
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interface/index.d.mts +2 -1
- package/dist/interface/index.d.ts +2 -1
- package/dist/interface/quest/QuestProps.d.mts +2 -1
- package/dist/interface/quest/QuestProps.d.ts +2 -1
- package/dist/interface/quest/StageProps.d.mts +2 -1
- package/dist/interface/quest/StageProps.d.ts +2 -1
- package/dist/override/index.d.mts +0 -1
- package/dist/override/index.d.ts +0 -1
- package/dist/types/QuestsRequired.d.mts +2 -1
- package/dist/types/QuestsRequired.d.ts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/override/OnNextStageQuest.d.mts +0 -19
- package/dist/override/OnNextStageQuest.d.ts +0 -19
- package/dist/override/OnNextStageQuest.js +0 -4
- package/dist/override/OnNextStageQuest.js.map +0 -1
- package/dist/override/OnNextStageQuest.mjs +0 -3
- package/dist/override/OnNextStageQuest.mjs.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { OnRenderGraphicItemProps, GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartStageQuest, OnEndStageQuest } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.mjs';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.mjs';
|
|
5
|
+
import OnEndStageQuest$1 from './override/OnEndStageQuest.mjs';
|
|
5
6
|
|
|
6
7
|
declare class Stage extends StoredClassModel implements StageProps {
|
|
7
8
|
constructor(id: string, props: StageProps);
|
|
@@ -60,12 +61,12 @@ declare class Stage extends StoredClassModel implements StageProps {
|
|
|
60
61
|
/**
|
|
61
62
|
* The function that will be called when the stage starts.
|
|
62
63
|
*/
|
|
63
|
-
get onStart(): undefined | ((props:
|
|
64
|
+
get onStart(): undefined | ((props: OnStartStageQuest) => void);
|
|
64
65
|
private _onEnd?;
|
|
65
66
|
/**
|
|
66
67
|
* The function that will be called when the stage ends.
|
|
67
68
|
*/
|
|
68
|
-
get onEnd(): undefined | ((props:
|
|
69
|
+
get onEnd(): undefined | ((props: OnEndStageQuest) => void);
|
|
69
70
|
}
|
|
70
71
|
declare class StageQuest extends Stage {
|
|
71
72
|
constructor(id: string, props: StageProps);
|
|
@@ -101,7 +102,7 @@ declare class StageQuest extends Stage {
|
|
|
101
102
|
/**
|
|
102
103
|
* The function that will be called when the stage starts.
|
|
103
104
|
*/
|
|
104
|
-
start(props:
|
|
105
|
+
start(props: OnStartStageQuest): void;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
declare class Quest extends StoredClassModel {
|
|
@@ -153,12 +154,22 @@ declare class Quest extends StoredClassModel {
|
|
|
153
154
|
* If the quest is completed.
|
|
154
155
|
*/
|
|
155
156
|
get completed(): boolean;
|
|
157
|
+
private _onStart?;
|
|
158
|
+
/**
|
|
159
|
+
* The function that will be called when the quest starts.
|
|
160
|
+
*/
|
|
161
|
+
get onStart(): undefined | ((props: OnStartStageQuest) => void);
|
|
162
|
+
private _onNextStage?;
|
|
163
|
+
/**
|
|
164
|
+
* The function that will be called when the quest goes to the next stage.
|
|
165
|
+
*/
|
|
166
|
+
get onNextStage(): undefined | ((props: OnEndStageQuest) => void);
|
|
156
167
|
/**
|
|
157
168
|
* Start the quest.
|
|
158
169
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
159
170
|
* @returns
|
|
160
171
|
*/
|
|
161
|
-
start(props:
|
|
172
|
+
start(props: OnStartStageQuest): void;
|
|
162
173
|
/**
|
|
163
174
|
* Go to the next stage if the current stage is completed.
|
|
164
175
|
* If you want to force the change of stage, use goNextStage.
|
|
@@ -166,7 +177,7 @@ declare class Quest extends StoredClassModel {
|
|
|
166
177
|
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
167
178
|
* @returns true if the stage was changed, false otherwise.
|
|
168
179
|
*/
|
|
169
|
-
tryToGoNextStage(startProps:
|
|
180
|
+
tryToGoNextStage(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
170
181
|
/**
|
|
171
182
|
* Complete the current stage and go to the next stage.
|
|
172
183
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
@@ -174,7 +185,7 @@ declare class Quest extends StoredClassModel {
|
|
|
174
185
|
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
175
186
|
* @returns true if the stage was changed, false otherwise.
|
|
176
187
|
*/
|
|
177
|
-
completeCurrentStageAndGoNext(startProps:
|
|
188
|
+
completeCurrentStageAndGoNext(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
178
189
|
/**
|
|
179
190
|
* Go to the next stage without checking if the current stage is completed.
|
|
180
191
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
@@ -182,7 +193,7 @@ declare class Quest extends StoredClassModel {
|
|
|
182
193
|
* @param endProps
|
|
183
194
|
* @returns returns true if the stage was changed, false otherwise.
|
|
184
195
|
*/
|
|
185
|
-
goNextStage(startProps:
|
|
196
|
+
goNextStage(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
186
197
|
/**
|
|
187
198
|
* If the current stage must start. It is true if the current stage is not started, can start and not completed.
|
|
188
199
|
*/
|
|
@@ -191,7 +202,7 @@ declare class Quest extends StoredClassModel {
|
|
|
191
202
|
* Start the current stage.
|
|
192
203
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
193
204
|
*/
|
|
194
|
-
startCurrentStage(props:
|
|
205
|
+
startCurrentStage(props: OnStartStageQuest): void;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
208
|
type QuestsRequiredType = {
|
|
@@ -235,6 +246,14 @@ interface QuestProps {
|
|
|
235
246
|
* @default false
|
|
236
247
|
*/
|
|
237
248
|
isInDevelopment?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* The function that will be executed when the quest starts.
|
|
251
|
+
*/
|
|
252
|
+
onStart?: (quest: Quest, props: OnStartStageQuest) => void;
|
|
253
|
+
/**
|
|
254
|
+
* The function that will be executed when a stage end in the quest.
|
|
255
|
+
*/
|
|
256
|
+
onNextStage?: (quest: Quest, props: OnEndStageQuest$1) => void;
|
|
238
257
|
}
|
|
239
258
|
|
|
240
259
|
interface StageProps {
|
|
@@ -301,11 +320,11 @@ interface StageProps {
|
|
|
301
320
|
/**
|
|
302
321
|
* The function that will be executed when the stage starts.
|
|
303
322
|
*/
|
|
304
|
-
onStart?: (props:
|
|
323
|
+
onStart?: (stage: Stage, props: OnStartStageQuest) => void;
|
|
305
324
|
/**
|
|
306
325
|
* The function that will be executed when the stage ends.
|
|
307
326
|
*/
|
|
308
|
-
onEnd?: (props:
|
|
327
|
+
onEnd?: (stage: Stage, props: OnEndStageQuest) => void;
|
|
309
328
|
}
|
|
310
329
|
|
|
311
330
|
export { Quest as Q, Stage as S, type QuestProps as a, type StageProps as b, type QuestsRequiredType as c, StageQuest as d };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { OnRenderGraphicItemProps, GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartStageQuest, OnEndStageQuest } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.js';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.js';
|
|
5
|
+
import OnEndStageQuest$1 from './override/OnEndStageQuest.js';
|
|
5
6
|
|
|
6
7
|
declare class Stage extends StoredClassModel implements StageProps {
|
|
7
8
|
constructor(id: string, props: StageProps);
|
|
@@ -60,12 +61,12 @@ declare class Stage extends StoredClassModel implements StageProps {
|
|
|
60
61
|
/**
|
|
61
62
|
* The function that will be called when the stage starts.
|
|
62
63
|
*/
|
|
63
|
-
get onStart(): undefined | ((props:
|
|
64
|
+
get onStart(): undefined | ((props: OnStartStageQuest) => void);
|
|
64
65
|
private _onEnd?;
|
|
65
66
|
/**
|
|
66
67
|
* The function that will be called when the stage ends.
|
|
67
68
|
*/
|
|
68
|
-
get onEnd(): undefined | ((props:
|
|
69
|
+
get onEnd(): undefined | ((props: OnEndStageQuest) => void);
|
|
69
70
|
}
|
|
70
71
|
declare class StageQuest extends Stage {
|
|
71
72
|
constructor(id: string, props: StageProps);
|
|
@@ -101,7 +102,7 @@ declare class StageQuest extends Stage {
|
|
|
101
102
|
/**
|
|
102
103
|
* The function that will be called when the stage starts.
|
|
103
104
|
*/
|
|
104
|
-
start(props:
|
|
105
|
+
start(props: OnStartStageQuest): void;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
declare class Quest extends StoredClassModel {
|
|
@@ -153,12 +154,22 @@ declare class Quest extends StoredClassModel {
|
|
|
153
154
|
* If the quest is completed.
|
|
154
155
|
*/
|
|
155
156
|
get completed(): boolean;
|
|
157
|
+
private _onStart?;
|
|
158
|
+
/**
|
|
159
|
+
* The function that will be called when the quest starts.
|
|
160
|
+
*/
|
|
161
|
+
get onStart(): undefined | ((props: OnStartStageQuest) => void);
|
|
162
|
+
private _onNextStage?;
|
|
163
|
+
/**
|
|
164
|
+
* The function that will be called when the quest goes to the next stage.
|
|
165
|
+
*/
|
|
166
|
+
get onNextStage(): undefined | ((props: OnEndStageQuest) => void);
|
|
156
167
|
/**
|
|
157
168
|
* Start the quest.
|
|
158
169
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
159
170
|
* @returns
|
|
160
171
|
*/
|
|
161
|
-
start(props:
|
|
172
|
+
start(props: OnStartStageQuest): void;
|
|
162
173
|
/**
|
|
163
174
|
* Go to the next stage if the current stage is completed.
|
|
164
175
|
* If you want to force the change of stage, use goNextStage.
|
|
@@ -166,7 +177,7 @@ declare class Quest extends StoredClassModel {
|
|
|
166
177
|
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
167
178
|
* @returns true if the stage was changed, false otherwise.
|
|
168
179
|
*/
|
|
169
|
-
tryToGoNextStage(startProps:
|
|
180
|
+
tryToGoNextStage(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
170
181
|
/**
|
|
171
182
|
* Complete the current stage and go to the next stage.
|
|
172
183
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
@@ -174,7 +185,7 @@ declare class Quest extends StoredClassModel {
|
|
|
174
185
|
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
175
186
|
* @returns true if the stage was changed, false otherwise.
|
|
176
187
|
*/
|
|
177
|
-
completeCurrentStageAndGoNext(startProps:
|
|
188
|
+
completeCurrentStageAndGoNext(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
178
189
|
/**
|
|
179
190
|
* Go to the next stage without checking if the current stage is completed.
|
|
180
191
|
* If you want to go to the next stage only if the current stage is completed, use tryToGoNextStage.
|
|
@@ -182,7 +193,7 @@ declare class Quest extends StoredClassModel {
|
|
|
182
193
|
* @param endProps
|
|
183
194
|
* @returns returns true if the stage was changed, false otherwise.
|
|
184
195
|
*/
|
|
185
|
-
goNextStage(startProps:
|
|
196
|
+
goNextStage(startProps: OnStartStageQuest, endProps: OnEndStageQuest): boolean;
|
|
186
197
|
/**
|
|
187
198
|
* If the current stage must start. It is true if the current stage is not started, can start and not completed.
|
|
188
199
|
*/
|
|
@@ -191,7 +202,7 @@ declare class Quest extends StoredClassModel {
|
|
|
191
202
|
* Start the current stage.
|
|
192
203
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
193
204
|
*/
|
|
194
|
-
startCurrentStage(props:
|
|
205
|
+
startCurrentStage(props: OnStartStageQuest): void;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
208
|
type QuestsRequiredType = {
|
|
@@ -235,6 +246,14 @@ interface QuestProps {
|
|
|
235
246
|
* @default false
|
|
236
247
|
*/
|
|
237
248
|
isInDevelopment?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* The function that will be executed when the quest starts.
|
|
251
|
+
*/
|
|
252
|
+
onStart?: (quest: Quest, props: OnStartStageQuest) => void;
|
|
253
|
+
/**
|
|
254
|
+
* The function that will be executed when a stage end in the quest.
|
|
255
|
+
*/
|
|
256
|
+
onNextStage?: (quest: Quest, props: OnEndStageQuest$1) => void;
|
|
238
257
|
}
|
|
239
258
|
|
|
240
259
|
interface StageProps {
|
|
@@ -301,11 +320,11 @@ interface StageProps {
|
|
|
301
320
|
/**
|
|
302
321
|
* The function that will be executed when the stage starts.
|
|
303
322
|
*/
|
|
304
|
-
onStart?: (props:
|
|
323
|
+
onStart?: (stage: Stage, props: OnStartStageQuest) => void;
|
|
305
324
|
/**
|
|
306
325
|
* The function that will be executed when the stage ends.
|
|
307
326
|
*/
|
|
308
|
-
onEnd?: (props:
|
|
327
|
+
onEnd?: (stage: Stage, props: OnEndStageQuest) => void;
|
|
309
328
|
}
|
|
310
329
|
|
|
311
330
|
export { Quest as Q, Stage as S, type QuestProps as a, type StageProps as b, type QuestsRequiredType as c, StageQuest as d };
|
package/dist/classes/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-BHB-jYOi.mjs';
|
|
2
2
|
export { default as Goal } from './quest/Goal.mjs';
|
|
3
|
-
export { Q as Quest, S as Stage } from '../StageProps-
|
|
3
|
+
export { Q as Quest, S as Stage } from '../StageProps-BP4soUUZ.mjs';
|
|
4
4
|
import '@drincs/nqtr/dist/override';
|
|
5
5
|
import '@drincs/pixi-vn';
|
|
6
6
|
import '../ActivityProps-D45DQdcT.mjs';
|
|
@@ -10,3 +10,4 @@ import '../types/ExecutionType.mjs';
|
|
|
10
10
|
import '../types/OnRunCommitmentEvent.mjs';
|
|
11
11
|
import '../interface/quest/GoalProps.mjs';
|
|
12
12
|
import '../interface/quest/StageFlags.mjs';
|
|
13
|
+
import '../override/OnEndStageQuest.mjs';
|
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as ActivityRoom, C as CommitmentBaseModel, L as LocationBaseModel, M as MapBaseModel, R as RoomBaseModel } from '../Commitment-D-1lsnnU.js';
|
|
2
2
|
export { default as Goal } from './quest/Goal.js';
|
|
3
|
-
export { Q as Quest, S as Stage } from '../StageProps-
|
|
3
|
+
export { Q as Quest, S as Stage } from '../StageProps-DVGvhQgr.js';
|
|
4
4
|
import '@drincs/nqtr/dist/override';
|
|
5
5
|
import '@drincs/pixi-vn';
|
|
6
6
|
import '../ActivityProps-BkHX8xkA.js';
|
|
@@ -10,3 +10,4 @@ import '../types/ExecutionType.js';
|
|
|
10
10
|
import '../types/OnRunCommitmentEvent.js';
|
|
11
11
|
import '../interface/quest/GoalProps.js';
|
|
12
12
|
import '../interface/quest/StageFlags.js';
|
|
13
|
+
import '../override/OnEndStageQuest.js';
|
package/dist/classes/index.js
CHANGED
|
@@ -1064,13 +1064,21 @@ var Stage = class extends pixiVn.StoredClassModel {
|
|
|
1064
1064
|
* The function that will be called when the stage starts.
|
|
1065
1065
|
*/
|
|
1066
1066
|
get onStart() {
|
|
1067
|
-
|
|
1067
|
+
let onStart = this._onStart;
|
|
1068
|
+
if (onStart === void 0) {
|
|
1069
|
+
return void 0;
|
|
1070
|
+
}
|
|
1071
|
+
return (props) => onStart(this, props);
|
|
1068
1072
|
}
|
|
1069
1073
|
/**
|
|
1070
1074
|
* The function that will be called when the stage ends.
|
|
1071
1075
|
*/
|
|
1072
1076
|
get onEnd() {
|
|
1073
|
-
|
|
1077
|
+
let onEnd = this._onEnd;
|
|
1078
|
+
if (onEnd === void 0) {
|
|
1079
|
+
return void 0;
|
|
1080
|
+
}
|
|
1081
|
+
return (props) => onEnd(this, props);
|
|
1074
1082
|
}
|
|
1075
1083
|
};
|
|
1076
1084
|
var StageQuest = class extends Stage {
|
|
@@ -1192,6 +1200,8 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1192
1200
|
this._renderIcon = props.renderIcon;
|
|
1193
1201
|
this._renderImage = props.renderImage;
|
|
1194
1202
|
this._isInDevelopment = props.isInDevelopment || false;
|
|
1203
|
+
this._onStart = props.onStart;
|
|
1204
|
+
this._onNextStage = props.onNextStage;
|
|
1195
1205
|
}
|
|
1196
1206
|
/**
|
|
1197
1207
|
* The stages of the quest.
|
|
@@ -1283,6 +1293,26 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1283
1293
|
}
|
|
1284
1294
|
return this.currentStageIndex > this.stages.length - 1;
|
|
1285
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* The function that will be called when the quest starts.
|
|
1298
|
+
*/
|
|
1299
|
+
get onStart() {
|
|
1300
|
+
let onStart = this._onStart;
|
|
1301
|
+
if (onStart === void 0) {
|
|
1302
|
+
return void 0;
|
|
1303
|
+
}
|
|
1304
|
+
return (props) => onStart(this, props);
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* The function that will be called when the quest goes to the next stage.
|
|
1308
|
+
*/
|
|
1309
|
+
get onNextStage() {
|
|
1310
|
+
let onNext = this._onNextStage;
|
|
1311
|
+
if (onNext === void 0) {
|
|
1312
|
+
return void 0;
|
|
1313
|
+
}
|
|
1314
|
+
return (props) => onNext(this, props);
|
|
1315
|
+
}
|
|
1286
1316
|
/**
|
|
1287
1317
|
* Start the quest.
|
|
1288
1318
|
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
@@ -1300,6 +1330,7 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1300
1330
|
this.currentStageIndex = 0;
|
|
1301
1331
|
let currentStage = this.currentStage;
|
|
1302
1332
|
if (currentStage && currentStage.start) {
|
|
1333
|
+
this.onStart && this.onStart(props);
|
|
1303
1334
|
return currentStage.start(props);
|
|
1304
1335
|
} else {
|
|
1305
1336
|
console.error(`[NQTR] Quest ${this.id} has no start stage`);
|
|
@@ -1368,6 +1399,7 @@ var Quest = class extends pixiVn.StoredClassModel {
|
|
|
1368
1399
|
return false;
|
|
1369
1400
|
}
|
|
1370
1401
|
this.currentStageIndex = currentStageIndex + 1;
|
|
1402
|
+
this.onNextStage && this.onNextStage(endProps);
|
|
1371
1403
|
if (prevStage && prevStage.onEnd) {
|
|
1372
1404
|
prevStage.onEnd(endProps);
|
|
1373
1405
|
}
|