@cc-component/cc-guide 1.0.5 → 1.0.7
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.
|
@@ -31,7 +31,7 @@ export class GuideCenter {
|
|
|
31
31
|
|
|
32
32
|
callClick: (step: number) => void;
|
|
33
33
|
callJumpWindow: (urls: string[]) => void;
|
|
34
|
-
callFinishGroup: () => void;
|
|
34
|
+
callFinishGroup: (groupId: number) => void;
|
|
35
35
|
/** 游戏初始化模块 */
|
|
36
36
|
guide: Guide = null!;
|
|
37
37
|
node: Node;
|
|
@@ -207,7 +207,7 @@ export class GuideCenter {
|
|
|
207
207
|
} else {
|
|
208
208
|
this.step = 100000
|
|
209
209
|
step_net = this.step;
|
|
210
|
-
GuideModule.GuideCenter.callFinishGroup?.()
|
|
210
|
+
GuideModule.GuideCenter.callFinishGroup?.(curren.data.groupID)
|
|
211
211
|
}
|
|
212
212
|
this.callMessageNet?.(step_net, () => { }) //功能引导
|
|
213
213
|
}
|
|
@@ -321,7 +321,7 @@ export class GuideCenter {
|
|
|
321
321
|
OnMessageJumpWindow(call: (urls: string[]) => void) {
|
|
322
322
|
this.callJumpWindow = call
|
|
323
323
|
}
|
|
324
|
-
OnMessageFinishGroup(call: () => void) {
|
|
324
|
+
OnMessageFinishGroup(call: (groupId: number) => void) {
|
|
325
325
|
this.callFinishGroup = call
|
|
326
326
|
}
|
|
327
327
|
|
|
@@ -190,13 +190,21 @@ export class GuideViewComp extends Component {
|
|
|
190
190
|
});
|
|
191
191
|
|
|
192
192
|
} else {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
//@ts-ignore
|
|
194
|
+
const event = button.onClick;//自定义事件
|
|
195
|
+
if (event) {
|
|
196
|
+
event.dispatch()
|
|
197
|
+
this.onClick()
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
button.clickEvents.forEach((e, index) => {
|
|
201
|
+
if (button.interactable)
|
|
202
|
+
e.emit([event]);
|
|
203
|
+
if (index === 0) {
|
|
204
|
+
this.onClick()
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
200
208
|
}
|
|
201
209
|
} else {
|
|
202
210
|
const item = this.model.current
|
|
@@ -22,7 +22,7 @@ class GuideModule {
|
|
|
22
22
|
static OnMessageStepNet(call: (step: number, finish: Function) => void) { GuideCenter.instance.OnMessageStepNet(call) }
|
|
23
23
|
static OnMessageClick(call: (step: number) => void) { GuideCenter.instance.OnMessageClick(call) }
|
|
24
24
|
static OnMessageJumpWindow(call: (urls: string[]) => void) { GuideCenter.instance.OnMessageJumpWindow(call) }
|
|
25
|
-
static OnMessageFinishGroup(call: () => void) { GuideCenter.instance.OnMessageFinishGroup(call) }
|
|
25
|
+
static OnMessageFinishGroup(call: (groupId: number) => void) { GuideCenter.instance.OnMessageFinishGroup(call) }
|
|
26
26
|
/**是否引导中 */
|
|
27
27
|
static GuideShow(): boolean { return GuideSDK.GuideShow() };
|
|
28
28
|
|
|
@@ -25,7 +25,7 @@ declare global {
|
|
|
25
25
|
/**监听跳转界面 */
|
|
26
26
|
function OnMessageJumpWindow(call: (urls: string[]) => void)
|
|
27
27
|
/**监听完成引导组引导 */
|
|
28
|
-
function OnMessageFinishGroup(call: () => void)
|
|
28
|
+
function OnMessageFinishGroup(call: (groupId: number) => void)
|
|
29
29
|
/**是否引导中 */
|
|
30
30
|
function GuideShow(): boolean;
|
|
31
31
|
|