@cc-component/cc-guide 1.0.8 → 1.1.0
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.
|
@@ -27,11 +27,13 @@ export class GuideCenter {
|
|
|
27
27
|
return GuideCenter.instance;
|
|
28
28
|
}
|
|
29
29
|
callMessage: (param: ITableGuide) => void;
|
|
30
|
+
callMessageView: (param: ITableGuide) => void;
|
|
31
|
+
|
|
30
32
|
callMessageNet: (param: number, finish: Function) => void;
|
|
31
33
|
|
|
32
34
|
callClick: (step: number) => void;
|
|
33
35
|
callJumpWindow: (urls: string[]) => void;
|
|
34
|
-
callFinishGroup: (groupId: number) => void;
|
|
36
|
+
callFinishGroup: (groupId: number, enableGroup: number) => void;
|
|
35
37
|
/** 游戏初始化模块 */
|
|
36
38
|
guide: Guide = null!;
|
|
37
39
|
node: Node;
|
|
@@ -205,8 +207,8 @@ export class GuideCenter {
|
|
|
205
207
|
} else {
|
|
206
208
|
this.step = 100000
|
|
207
209
|
step_net = this.step;
|
|
208
|
-
GuideModule.GuideCenter.callFinishGroup?.(curren.data.groupID)
|
|
209
210
|
}
|
|
211
|
+
GuideModule.GuideCenter.callFinishGroup?.(curren.data.groupID, enableGroup)
|
|
210
212
|
this.callMessageNet?.(step_net, () => { }) //功能引导
|
|
211
213
|
}
|
|
212
214
|
else {
|
|
@@ -310,6 +312,9 @@ export class GuideCenter {
|
|
|
310
312
|
OnMessageStep(call: (param: ITableGuide) => void) {
|
|
311
313
|
this.callMessage = call
|
|
312
314
|
}
|
|
315
|
+
OnMessageStepView(call: (param: ITableGuide) => void) {
|
|
316
|
+
this.callMessageView = call
|
|
317
|
+
}
|
|
313
318
|
OnMessageStepNet(call: (step: number, finish: Function) => void) {
|
|
314
319
|
this.callMessageNet = call
|
|
315
320
|
}
|
|
@@ -319,7 +324,7 @@ export class GuideCenter {
|
|
|
319
324
|
OnMessageJumpWindow(call: (urls: string[]) => void) {
|
|
320
325
|
this.callJumpWindow = call
|
|
321
326
|
}
|
|
322
|
-
OnMessageFinishGroup(call: (groupId: number) => void) {
|
|
327
|
+
OnMessageFinishGroup(call: (groupId: number, enableGroup: number) => void) {
|
|
323
328
|
this.callFinishGroup = call
|
|
324
329
|
}
|
|
325
330
|
|
|
@@ -113,6 +113,7 @@ export class GuideViewComp extends Component {
|
|
|
113
113
|
else {
|
|
114
114
|
Log.log(`当前步骤:${this.model.step} 引导事件节点:${btn.name}--父节点:${btn.parent.name}`)
|
|
115
115
|
GuideModule.GuideCenter.callMessage?.(this.model.currentPrompt.data)
|
|
116
|
+
GuideModule.GuideCenter.callMessageView?.(this.model.currentPrompt.data)
|
|
116
117
|
|
|
117
118
|
GuideModule.GuideCenter.is_guide_week = false;
|
|
118
119
|
// const is_choose = this.model.step === 5 || this.model.step === 6
|
|
@@ -19,10 +19,12 @@ class GuideModule {
|
|
|
19
19
|
static get GuideCenter() { return GuideCenter.instance; }
|
|
20
20
|
static MoveTo(param: any, window_name: string): { window: string, value: any } { return GuideSDK.MoveTo(param, window_name) };
|
|
21
21
|
static OnMessageStep(call: (param: ITableGuide) => void) { GuideCenter.instance.OnMessageStep(call) }
|
|
22
|
+
static OnMessageStepView(call: (param: ITableGuide) => void) { GuideCenter.instance.OnMessageStepView(call) }
|
|
23
|
+
|
|
22
24
|
static OnMessageStepNet(call: (step: number, finish: Function) => void) { GuideCenter.instance.OnMessageStepNet(call) }
|
|
23
25
|
static OnMessageClick(call: (step: number) => void) { GuideCenter.instance.OnMessageClick(call) }
|
|
24
26
|
static OnMessageJumpWindow(call: (urls: string[]) => void) { GuideCenter.instance.OnMessageJumpWindow(call) }
|
|
25
|
-
static OnMessageFinishGroup(call: (groupId: number) => void) { GuideCenter.instance.OnMessageFinishGroup(call) }
|
|
27
|
+
static OnMessageFinishGroup(call: (groupId: number, enableGroup: number) => void) { GuideCenter.instance.OnMessageFinishGroup(call) }
|
|
26
28
|
/**是否引导中 */
|
|
27
29
|
static GuideShow(): boolean { return GuideSDK.GuideShow() };
|
|
28
30
|
|
|
@@ -18,14 +18,16 @@ declare global {
|
|
|
18
18
|
function MoveTo(param: any, window: string): { window: string, value: any };
|
|
19
19
|
/**必须实现该方法: 需要更新服务器的步骤*/
|
|
20
20
|
function OnMessageStepNet(call: (step: number, finish: Function) => void)
|
|
21
|
-
|
|
21
|
+
/**监听更新步骤-界面中监听 */
|
|
22
|
+
function OnMessageStepView(call: (param: ITableGuide) => void)
|
|
23
|
+
/**监听更新步骤-初始化时监听 */
|
|
22
24
|
function OnMessageStep(call: (param: ITableGuide) => void)
|
|
23
25
|
/**监听点击了引导事件 */
|
|
24
26
|
function OnMessageClick(call: (step: number) => void)
|
|
25
27
|
/**监听跳转界面 */
|
|
26
28
|
function OnMessageJumpWindow(call: (urls: string[]) => void)
|
|
27
29
|
/**监听完成引导组引导 */
|
|
28
|
-
function OnMessageFinishGroup(call: (groupId: number) => void)
|
|
30
|
+
function OnMessageFinishGroup(call: (groupId: number, enableGroup: number) => void)
|
|
29
31
|
/**是否引导中 */
|
|
30
32
|
function GuideShow(): boolean;
|
|
31
33
|
/**开启日志打印 */
|