Commit 53952614 authored by 李维's avatar 李维

dev commit

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