Commit 9be0e7d4 authored by unknown's avatar unknown

魔法咒语好了1

parent dca64066
...@@ -5,6 +5,7 @@ import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr'; ...@@ -5,6 +5,7 @@ import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr';
import { Utils } from '../../../../startFolder/script/common/Utils'; import { Utils } from '../../../../startFolder/script/common/Utils';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef'; import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewMgr'; import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewMgr';
import { BeginCountdownView } from '../../commonView/script/BeginCountdownView';
import { ChallengeFailView } from '../../commonView/script/ChallengeFailView'; import { ChallengeFailView } from '../../commonView/script/ChallengeFailView';
import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView'; import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView';
import { SwitchErrorView } from '../../commonView/script/SwitchErrorView'; import { SwitchErrorView } from '../../commonView/script/SwitchErrorView';
...@@ -90,6 +91,10 @@ export class MagicSpellsCtr extends Component { ...@@ -90,6 +91,10 @@ export class MagicSpellsCtr extends Component {
director.on("quesone_asw", this.onAswOneCall, this); director.on("quesone_asw", this.onAswOneCall, this);
director.on("questwo_asw", this.onAswTwoCall, this); director.on("questwo_asw", this.onAswTwoCall, this);
director.on("go_answer", this.aswOneStart, this); director.on("go_answer", this.aswOneStart, this);
director.on("begin_countdown_end", () => {
//引导
this.gameState = GAME_STATE.QUES;
}, this);
this.gameStart(); this.gameStart();
} }
...@@ -100,11 +105,18 @@ export class MagicSpellsCtr extends Component { ...@@ -100,11 +105,18 @@ export class MagicSpellsCtr extends Component {
} }
gameStart() { gameStart() {
viewMgr.closeView(VIEW_DEF.MgcSpQueView);
viewMgr.closeView(VIEW_DEF.MgcSpAswOneView);
viewMgr.closeView(VIEW_DEF.MgcSpAswTwoView);
this.countdownLab.string = Utils.formatTime(Math.floor(this.totalTime * 1000)); this.countdownLab.string = Utils.formatTime(Math.floor(this.totalTime * 1000));
this.curScore = 0; this.curScore = 0;
this.curScoreLab.string = "我的" + this.curScore + "分"; this.curScoreLab.string = "我的" + this.curScore + "分";
this.succScoreLab.string = "通关≥" + this.succScore + "分"; this.succScoreLab.string = "通关≥" + this.succScore + "分";
this.roundStart(false); this.roundStart(false);
this.gameState = GAME_STATE.READY;
viewMgr.openView(VIEW_DEF.BeginCountdownView, (node) => {
node.getComponent(BeginCountdownView)?.init();
}, VIEW_INDEX.UPPER);
} }
gameEnd() { gameEnd() {
......
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