Commit 53952614 authored by 李维's avatar 李维

dev commit

parent ec9f638f
...@@ -548,7 +548,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -548,7 +548,6 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
}) })
let bgInit = this.g_cartoon.createCartoonElementImageFunc(`block_${questionIndex}_${li}_container_init`, "bg_block_init", (w, h)=>{ let bgInit = this.g_cartoon.createCartoonElementImageFunc(`block_${questionIndex}_${li}_container_init`, "bg_block_init", (w, h)=>{
return { return {
sx: 80 / w, sx: 80 / w,
...@@ -631,7 +630,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -631,7 +630,6 @@ export class PlayComponent implements OnInit, OnDestroy {
bgFocus.ref.alpha = 0; bgFocus.ref.alpha = 0;
bgWrong.ref.alpha = 0; bgWrong.ref.alpha = 0;
text.ref.fontColor = "#b17d5a"; text.ref.fontColor = "#b17d5a";
// container.modified = false;
break; break;
case "disable": case "disable":
bgInit.ref.alpha = 0; bgInit.ref.alpha = 0;
...@@ -640,7 +638,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -640,7 +638,6 @@ export class PlayComponent implements OnInit, OnDestroy {
bgFocus.ref.alpha = 0; bgFocus.ref.alpha = 0;
bgWrong.ref.alpha = 0; bgWrong.ref.alpha = 0;
text.ref.fontColor = "#b17d5a"; text.ref.fontColor = "#b17d5a";
container.modified = false;
break; break;
case "right": case "right":
bgInit.ref.alpha = 0; bgInit.ref.alpha = 0;
...@@ -657,7 +654,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -657,7 +654,6 @@ export class PlayComponent implements OnInit, OnDestroy {
bgFocus.ref.alpha = 1; bgFocus.ref.alpha = 1;
bgWrong.ref.alpha = 0; bgWrong.ref.alpha = 0;
text.ref.fontColor = "#ffffff"; text.ref.fontColor = "#ffffff";
container.modified = false;
break; break;
case "wrong": case "wrong":
bgInit.ref.alpha = 0; bgInit.ref.alpha = 0;
...@@ -666,7 +662,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -666,7 +662,6 @@ export class PlayComponent implements OnInit, OnDestroy {
bgFocus.ref.alpha = 0; bgFocus.ref.alpha = 0;
bgWrong.ref.alpha = 1; bgWrong.ref.alpha = 1;
text.ref.fontColor = "#ffffff"; text.ref.fontColor = "#ffffff";
container.modified = false;
break; break;
} }
} }
...@@ -735,7 +730,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -735,7 +730,7 @@ export class PlayComponent implements OnInit, OnDestroy {
container.checkWhenSwitchQuestion = (withRed, fromIndex, groupIndex, contentSaved?) => { container.checkWhenSwitchQuestion = (withRed, fromIndex, groupIndex, contentSaved?) => {
// container.active(false); // container.active(false);
if(groupIndex!= this.m_currentQuestionIndex) { if(groupIndex!= this.m_currentQuestionIndex) {
if(container.getContentText() == "") { if(container.getContentText() == "") {
// container.switchStatus("init") // container.switchStatus("init")
} else { } else {
...@@ -757,7 +752,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -757,7 +752,7 @@ export class PlayComponent implements OnInit, OnDestroy {
container.active(true) container.active(true)
} }
} else { } else {
if(container.isCorrect) { if(container.isCorrect || container.modified) {
container.switchStatus("right") container.switchStatus("right")
} else { } else {
container.switchStatus("wrong") container.switchStatus("wrong")
...@@ -777,15 +772,16 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -777,15 +772,16 @@ export class PlayComponent implements OnInit, OnDestroy {
return return
} }
if(this.m_currentQuestionIndex != questionIndex) { if(this.m_currentQuestionIndex != questionIndex) {
this.switchQuestion(this.m_currentQuestionIndex, questionIndex) // this.switchQuestion(this.m_currentQuestionIndex, questionIndex)
} } else {
if(container.canSetActive()) { if(container.canSetActive()) {
if(this.m_currentInput) { if(this.m_currentInput) {
let currentAcitveNode = this.g_cartoon.getCartoonElement(this.m_currentInput) let currentAcitveNode = this.g_cartoon.getCartoonElement(this.m_currentInput)
currentAcitveNode.active(false) currentAcitveNode.active(false)
this.m_currentInputIndex = li this.m_currentInputIndex = li
}
container.active(true);
} }
container.active(true);
} }
this.g_enableMapDown = true; this.g_enableMapDown = true;
}) })
...@@ -853,12 +849,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -853,12 +849,12 @@ export class PlayComponent implements OnInit, OnDestroy {
// } // }
// }) // })
let element = this.g_cartoon.createCartoonElementShapeRect("checkpannel_container", this.g_canvasWidth / 2, this.g_canvasHeight, "#FFF") let element = this.g_cartoon.createCartoonElementShapeRect("checkpannel_container", this.g_canvasWidth / 2, this.g_canvasHeight, "#FFF")
element.ref.x = this.g_canvasWidth + 1000; element.ref.x = this.g_canvasWidth / 2;
element.ref.y = 0; element.ref.y = this.g_canvasHeight + 1000;
element.ref.alpha = 0; element.ref.alpha = 0;
element.in = (callback) => { element.in = (callback) => {
return tweenChange(element.ref, {x: this.g_canvasWidth / 2}, 1, ()=> { return tweenChange(element.ref, {y: 0}, 1, ()=> {
callback && callback() callback && callback()
}) })
} }
...@@ -866,7 +862,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -866,7 +862,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 背景 上:canvas高-中 中:985 下:canvas高-中-上 // 背景 上:canvas高-中 中:985 下:canvas高-中-上
let bgMiddle = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_middle`, "bg_check_middle", (w, h)=>{ let bgMiddle = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_middle`, "bg_check_middle", (w, h)=>{
return { return {
sx: this.g_canvasWidth / 2 / w, sx: 1194 * this.g_mapScale / w,
sy: 985 * this.g_mapScale / h, sy: 985 * this.g_mapScale / h,
} }
}, (w, h)=>{ }, (w, h)=>{
...@@ -879,7 +875,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -879,7 +875,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let bgTop = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_top`, "bg_check_top", (w, h)=>{ let bgTop = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_top`, "bg_check_top", (w, h)=>{
return { return {
sx: this.g_canvasWidth / 2 / w, sx: 1194 * this.g_mapScale / w,
sy: (this.g_canvasHeight - 985 * this.g_mapScale) / 2 / h, sy: (this.g_canvasHeight - 985 * this.g_mapScale) / 2 / h,
} }
}, (w, h)=>{ }, (w, h)=>{
...@@ -892,7 +888,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -892,7 +888,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let bBottom = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_bottom`, "bg_check_bottom", (w, h)=>{ let bBottom = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_bottom`, "bg_check_bottom", (w, h)=>{
return { return {
sx: this.g_canvasWidth / 2 / w, sx: 1194 * this.g_mapScale / w,
sy: (this.g_canvasHeight - 985 * this.g_mapScale) / 2 / h, sy: (this.g_canvasHeight - 985 * this.g_mapScale) / 2 / h,
} }
}, (w, h)=>{ }, (w, h)=>{
...@@ -905,7 +901,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -905,7 +901,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let bgMiddleMask = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_middle_mask`, "bg_check_middle_mask", (w, h)=>{ let bgMiddleMask = this.g_cartoon.createCartoonElementImageFunc(`checkpannel_bg_middle_mask`, "bg_check_middle_mask", (w, h)=>{
return { return {
sx: this.g_canvasWidth / 2 / w, sx: 1194 * this.g_mapScale / w,
sy: 985 * this.g_mapScale / h, sy: 985 * this.g_mapScale / h,
} }
}, (w, h)=>{ }, (w, h)=>{
...@@ -966,7 +962,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -966,7 +962,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}, (w, h)=>{ }, (w, h)=>{
return { return {
x: 0, x: 0,
y: 200 y: 180
} }
}) })
...@@ -986,7 +982,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -986,7 +982,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}, (w, h)=>{ }, (w, h)=>{
return { return {
x: 0, x: 0,
y: 250 + 80 y: 180 + 50
} }
}) })
...@@ -1338,12 +1334,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1338,12 +1334,12 @@ export class PlayComponent implements OnInit, OnDestroy {
totalHeight = creatItem(totalHeight, !(index==(totalNum-1)), element) totalHeight = creatItem(totalHeight, !(index==(totalNum-1)), element)
}); });
this.m_totalScrollHeight = totalHeight + 20; this.m_totalScrollHeight = totalHeight + 100;
sliderBG.initSlider(scrollContent.windowHeight, this.m_totalScrollHeight, 0) sliderBG.initSlider(scrollContent.windowHeight, this.m_totalScrollHeight, 0)
let scroll = this.g_cartoon.getCartoonElement("check_scroll_pannel") let scroll = this.g_cartoon.getCartoonElement("check_scroll_pannel")
scroll.ref.setSize(880, this.m_totalScrollHeight) scroll.ref.setSize(880, this.m_totalScrollHeight)
let checkPannel = this.g_cartoon.getCartoonElement("checkpannel_container"); let checkPannel = this.g_cartoon.getCartoonElement("checkpannel_container");
checkPannel.in() return checkPannel.in()
} }
initSubmit() { initSubmit() {
...@@ -1410,7 +1406,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1410,7 +1406,7 @@ export class PlayComponent implements OnInit, OnDestroy {
submit.out = (callback)=> { submit.out = (callback)=> {
btnSubmitShadow.ref.visible = false; btnSubmitShadow.ref.visible = false;
return tweenChange(submit.ref, {y: this.g_canvasHeight + 200}, 0.3, ()=>{ return tweenChange(submit.ref, {x: this.g_canvasWidth + 1000}, 0.3, ()=>{
callback && callback() callback && callback()
}) })
} }
...@@ -1446,6 +1442,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1446,6 +1442,12 @@ export class PlayComponent implements OnInit, OnDestroy {
console.log("全部正确") console.log("全部正确")
} }
this.m_blockGroup.forEach(group => {
group.forEach(block => {
block.modified = false;
});
});
if(this.m_submitedTimes>=2 || (this.m_submitedTimes<2 && !hasIncorrect)) { if(this.m_submitedTimes>=2 || (this.m_submitedTimes<2 && !hasIncorrect)) {
let qp = this.g_cartoon.getCartoonElement("question_container") let qp = this.g_cartoon.getCartoonElement("question_container")
let keyboard = this.g_cartoon.getCartoonElement("keyboard_container") let keyboard = this.g_cartoon.getCartoonElement("keyboard_container")
...@@ -1454,7 +1456,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1454,7 +1456,7 @@ export class PlayComponent implements OnInit, OnDestroy {
await keyboard.out() await keyboard.out()
await submitButton.out() await submitButton.out()
await this.showCheckPannel(result) await this.showCheckPannel(result)
this.g_cartoon.getCartoonElement("background_mask").ref.alpha = 0 // this.g_cartoon.getCartoonElement("background_mask").ref.alpha = 0
this.g_enableMapDown = true; this.g_enableMapDown = true;
this.endGame(); this.endGame();
} }
......
src/assets/play/bg_check_middle.png

331 KB | W: | H:

src/assets/play/bg_check_middle.png

8.53 KB | W: | H:

src/assets/play/bg_check_middle.png
src/assets/play/bg_check_middle.png
src/assets/play/bg_check_middle.png
src/assets/play/bg_check_middle.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