Commit cd7b2940 authored by 李维's avatar 李维

bug fix

parent 69d25f00
......@@ -142,6 +142,7 @@ export class PlayComponent implements OnInit, OnDestroy {
m_totalScrollHeight = 0;
m_questionIndexArray = [];
m_endGame = false;
m_resultSaved = [];
// ------------------------------------
......@@ -239,6 +240,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.m_totalScrollHeight = 0;
this.m_questionIndexArray = [];
this.m_endGame = false;
this.m_resultSaved = [];
}
startGame(){
......@@ -480,7 +482,7 @@ export class PlayComponent implements OnInit, OnDestroy {
} else {
target.setContentText(letttes[i-1].toLocaleLowerCase())
}
await this.buttonPressAnimation(le.id)
this.buttonPressAnimation(le.id)
this.g_enableMapDown = true;
this.jumpToNextActive(this.m_currentQuestionIndex);
})
......@@ -825,6 +827,16 @@ export class PlayComponent implements OnInit, OnDestroy {
let rolNum = this.g_formData.grid.length;
let colNum = this.g_formData.grid[0].length;
if(rolNum==17) {
element.ref.x -= 150 * this.g_mapScale
} else if(rolNum==15) {
element.ref.x -= 120 * this.g_mapScale
} else if(rolNum==12) {
element.ref.x -= 80 * this.g_mapScale
} else if(rolNum==9) {
element.ref.x -= 60 * this.g_mapScale
}
let width = 900;
let height = 900;
......@@ -961,8 +973,8 @@ export class PlayComponent implements OnInit, OnDestroy {
})
bgMiddleMask.ref.addChild(checkTop.ref)
let labelText = this.g_cartoon.createCartoonElementLabel("Chenck_label_title", "Check", "Aileron-Black", "#FFFFFF", 60)
checkTop.ref.addChild(labelText.ref);
// let labelText = this.g_cartoon.createCartoonElementLabel("Chenck_label_title", "Check", "Aileron-Black", "#FFFFFF", 60)
// checkTop.ref.addChild(labelText.ref);
let checkBottom = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_checnk_bottom`, "check_bottom", (w, h)=>{
return {
......@@ -1089,6 +1101,11 @@ export class PlayComponent implements OnInit, OnDestroy {
}
sendResult() {
// console.log(JSON.stringify(this.m_resultSaved))
window.parent.postMessage( {action: 'temp_send_result', data: JSON.stringify(this.m_resultSaved)}, "*")
}
getResult() {
let resultDataStr = []
this.m_blockGroup.forEach(group => {
let rightLetters = "";
......@@ -1102,7 +1119,7 @@ export class PlayComponent implements OnInit, OnDestroy {
})
});
// console.log(JSON.stringify(resultDataStr))
window.parent.postMessage( {action: 'temp_send_result', data: JSON.stringify(resultDataStr)}, "*")
return resultDataStr
}
initSlider() {
......@@ -1546,10 +1563,10 @@ export class PlayComponent implements OnInit, OnDestroy {
});
});
this.m_resultSaved.push(this.getResult());
if(errorIndex>=0) {
this.switchQuestion(this.m_currentQuestionIndex, errorIndex)
}
if(this.m_submitedTimes>=2 || (this.m_submitedTimes<2 && !hasIncorrect)) {
let qp = this.g_cartoon.getCartoonElement("question_container")
let keyboard = this.g_cartoon.getCartoonElement("keyboard_container")
......@@ -1907,6 +1924,7 @@ export class PlayComponent implements OnInit, OnDestroy {
mapDown(event) {
event.preventDefault();
let myStopPropagation = false;
if (!this.g_enableMapDown) {
return;
......@@ -1939,6 +1957,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
mapMove(event) {
// event.preventDefault();
let myStopPropagation = false;
if (!this.g_enableMapMove) {
return;
......@@ -1957,6 +1976,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
mapUp(event) {
// event.preventDefault();
let myStopPropagation = false;
if (!this.g_enableMapUp) {
return;
......
src/assets/play/check_top.png

13.8 KB | W: | H:

src/assets/play/check_top.png

33.3 KB | W: | H:

src/assets/play/check_top.png
src/assets/play/check_top.png
src/assets/play/check_top.png
src/assets/play/check_top.png
  • 2-up
  • Swipe
  • Onion skin
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