Commit d15f09a0 authored by wildfirecode's avatar wildfirecode

Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev

parents ab422df7 c360c475
......@@ -199,7 +199,7 @@ export default class MainScene extends Scene {
Tool.init();
//第几关
this.chapter = (data && data.chapter) ? data.chapter : 1;
// this.chapter = 33;
// this.chapter = 25;
this.chapterTxt.text = "第" + this.chapter + "关";
//关卡数据,1期定制,70,后面35关地图一致,步数减少
var mapDataIndex = this.chapter;
......@@ -304,13 +304,15 @@ export default class MainScene extends Scene {
initSvgas() {
var resPath = getResPath()
var parser = new window["SVGA"].Parser();
var svgas = ["amazing", "great", "wonderful"]
var svgas = ["amazing", "great", "wonderful", "bonusTime"]
for (let i = 0; i < svgas.length; i++) {
parser.load(resPath + 'resource/assets/svgas/' + svgas[i] + ".svga", (videoItem) => {
var mv = new window["SVGA"].EgretMovieClip(videoItem);
mv.lockStep = true;
if (svgas[i] != "bonusTime") {
mv.x = (750 - 520) / 2;
mv.y = 500;
}
mv.stop();
let fun;
mv.addEventListener(egret.Event.COMPLETE, fun = function (e) {
......@@ -1273,11 +1275,23 @@ export default class MainScene extends Scene {
//连消基数为1
this.commonContinuityTimes = 1;
this.effectContinuityTimes = 1;
if (this.movieClips["bonusTime"]) {
this.addChild(this.movieClips["bonusTime"])
this.movieClips["bonusTime"].gotoAndPlay(1, true)
setTimeout(() => {
this.terminateSteps();
if (this.movieClips["bonusTime"].parent) {
this.removeChild(this.movieClips["bonusTime"])
}
}, 1930)
} else {
this.addChild(this.bonusTime);
this.bonusTime.play(() => {
this.removeChild(this.bonusTime)
this.terminateSteps();
})
}
return
}
//出累计一步分数的toast;
......
......@@ -47,6 +47,8 @@ export class ScoreProgress {
w = (663 - 595) * scale + 595;
if (this.star3.source != "lightedStar_png") {
this.star3.source = "lightedStar_png";
this.star2.source = "lightedStar_png";
this.star1.source = "lightedStar_png";
this.starCount = 3;
};
}
......@@ -56,6 +58,7 @@ export class ScoreProgress {
w = (595 - 522) * scale + 522;
if (this.star2.source != "lightedStar_png") {
this.star2.source = "lightedStar_png";
this.star1.source = "lightedStar_png";
this.starCount = 2;
};
}
......
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