Commit a545554f authored by limingzhe's avatar limingzhe

fix: debug

parent 02d404b0
No preview for this file type
...@@ -821,8 +821,8 @@ cc.Class({ ...@@ -821,8 +821,8 @@ cc.Class({
console.log("in showHelper"); console.log("in showHelper");
playAudio(this.helpClip, () => { this.helpAudioId = playAudio(this.helpClip, () => {
this.helpAudioId = null;
this.showHelperWrite(); this.showHelperWrite();
}) })
...@@ -830,6 +830,12 @@ cc.Class({ ...@@ -830,6 +830,12 @@ cc.Class({
}, },
pauseHelper() {
if (this.helpAudioId) {
cc.audioEngine.stopEffect(this.helpAudioId);
this.helpAudioId = null;
}
},
showHelperWrite() { showHelperWrite() {
...@@ -863,8 +869,17 @@ cc.Class({ ...@@ -863,8 +869,17 @@ cc.Class({
return; return;
} }
let disTime = 10;
if (this.data.helpTime) {
if (this.data.helpTime <= 0) {
return;
}
disTime = this.data.helpTime;
}
const curTime = new Date().getTime(); const curTime = new Date().getTime();
if (curTime - this.helperTime > 10 * 1000) { if (curTime - this.helperTime > disTime * 1000) {
this.showHelper(); this.showHelper();
this.resetHelperTime(); this.resetHelperTime();
} }
...@@ -3434,6 +3449,8 @@ cc.Class({ ...@@ -3434,6 +3449,8 @@ cc.Class({
checkGameEnd() { checkGameEnd() {
this.pauseHelper()
const arr = this.animaNodeArr; const arr = this.animaNodeArr;
const isEnd = arr.every(node => { const isEnd = arr.every(node => {
return node.isShowEnd; return node.isShowEnd;
......
...@@ -245,7 +245,14 @@ ...@@ -245,7 +245,14 @@
</div> </div>
<div style="margin-top: 30px; width: 300px; border: 1px solid #ccc ; border-radius: 5px;">
<div style="display: flex; justify-content: center; align-items: center; height: 50px">
<span style="width: 120px; margin-right: 10px;" align="right">帮助提示间隔(秒): </span>
<input type="text" nz-input [(ngModel)]="item.helpTime" (blur)="save()" style="margin-right: 15px; width: 100px ">
</div>
</div>
<div style="margin-top: 30px; width: 200px; height: 50px; border: 1px solid #ccc ; border-radius: 5px; display: flex; align-items: center; justify-content: center;"> <div style="margin-top: 30px; width: 200px; height: 50px; border: 1px solid #ccc ; border-radius: 5px; display: flex; align-items: center; justify-content: center;">
<label nz-checkbox [(ngModel)]="item.isGuide" (ngModelChange)="save()">首次引导</label> <label nz-checkbox [(ngModel)]="item.isGuide" (ngModelChange)="save()">首次引导</label>
</div> </div>
......
...@@ -218,6 +218,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -218,6 +218,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
if (this.item.helpTime == null) {
this.item.helpTime = 10;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment