Commit b9c88b34 authored by limingzhe's avatar limingzhe

fix: debug

parent 51f89e74
{"ver":"1.1.2","uuid":"e9f579c0-59b7-4567-93ad-5b17f799e827","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e9f579c0-59b7-4567-93ad-5b17f799e827",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -500,13 +500,17 @@ cc.Class({
console.log("in showHelper");
playAudio(this.helpClip, () => {
this.helpAudioId = playAudio(this.helpClip, () => {
this.helpAudioId = null;
this.showHelperWrite();
})
},
pauseHelper() {
if (this.helpAudioId) {
cc.audioEngine.stopEffect(this.helpAudioId);
this.helpAudioId = null;
}
},
showHelperSign() {
......@@ -598,8 +602,18 @@ cc.Class({
return;
}
let disTime = 10;
if (this.data.helpTime) {
if (this.data.helpTime <= 0) {
return;
}
disTime = this.data.helpTime;
}
const curTime = new Date().getTime();
if (curTime - this.helperTime > 10 * 1000) {
if (curTime - this.helperTime > disTime * 1000) {
this.showHelper();
this.resetHelperTime();
}
......@@ -1617,6 +1631,8 @@ cc.Class({
checkGameEnd() {
this.pauseHelper();
const writeNodeArr = this.writeNodeArr1.concat(this.writeNodeArr2);
const isEnd = writeNodeArr.every(node => {
return node.isShowEnd;
......
......@@ -153,6 +153,13 @@
>
</app-custom-hot-zone>
<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;">
<label nz-checkbox [(ngModel)]="item.isDebug" (ngModelChange)="save()">调试模式</label>
......
......@@ -116,6 +116,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (!this.item.animArr) {
this.item.animArr = this.animArr;
}
if (this.item.helpTime == null) {
this.item.helpTime = 10;
}
}
saveHotZone2(group, e) {
......
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