This commit is contained in:
@@ -65,11 +65,15 @@ class MazeQuizGame extends EventManager {
|
||||
if ( engine.hero.animationsMap?.win){
|
||||
engine.hero.animationsMap.idle = engine.hero.animationsMap.win
|
||||
}
|
||||
await Utils.wait(1000);
|
||||
engine.hero.cameraDelta = Math.PI;
|
||||
engine.hero.direction += Math.PI;
|
||||
// await Utils.wait(1000);
|
||||
// engine.hero.cameraDelta = Math.PI;
|
||||
// engine.hero.direction += Math.PI;
|
||||
//engine.hero.model.rotation.y += Math.PI;
|
||||
await Utils.wait(10000);
|
||||
engine.motionQueue.add({
|
||||
o: engine.hero,
|
||||
a:{cameraDelta: k=>k*Math.PI*6 },
|
||||
t: 12
|
||||
});
|
||||
this.dispatchEvent({type:'finish'})
|
||||
}else{
|
||||
engine.hero.animationsMap.idle = engine.hero.animationsMap._idle
|
||||
@@ -79,15 +83,19 @@ class MazeQuizGame extends EventManager {
|
||||
if (ud.qid !== undefined && e.started){
|
||||
engine.dashboard.updateText(ud.question.q)
|
||||
engine.dashboard.levelProgress.update(ud.qid / questions.length)
|
||||
this.dispatchEvent({type:'interaction'});
|
||||
}
|
||||
if (ud.corner && e.started){
|
||||
let q = ud.corner.question;
|
||||
if (!q.pointsAdded){
|
||||
let qid = data.questions.indexOf(q);
|
||||
if (!ud.corner.penalty){
|
||||
q.pointsAdded = true;
|
||||
engine.dashboard.addPoints(data.questionPoints - !!q.applyPenalty * data.questionPenalty)
|
||||
engine.tm?.post('answer', null, { question: qid, correct: true });
|
||||
}else{
|
||||
q.applyPenalty = true;
|
||||
engine.tm?.post('answer', null, { question: qid, correct: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,8 +104,7 @@ class MazeQuizGame extends EventManager {
|
||||
})
|
||||
await this.mazeObject.load();
|
||||
this.object = this.mazeObject.object;
|
||||
resolve(this)
|
||||
this.dispatchEvent({type:'interaction'});
|
||||
resolve(this);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user