Commit 1264dae8 authored by zjz1994's avatar zjz1994

Merge branch '676-700关卡' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into 草地

# Conflicts:
#	egret/src/something/chapters/Chapter26.ts
合并0429黑洞元素版本
parents b74cc7fb 521661dd
...@@ -127,8 +127,8 @@ ...@@ -127,8 +127,8 @@
// localStorage.clear(); // localStorage.clear();
window['imgver'] = '11112'; window['imgver'] = '11112';
//top 8 ,repeat 22 , bottom 3 //top 8 ,repeat 22 , bottom 3
window['total_level'] = 8 + 3 + 22 * 31; window['total_level'] = 8 + 3 + 22 * 32;
window['last_level'] = 675; window['last_level'] = 700;
var sharePic = document.getElementById('pic'); var sharePic = document.getElementById('pic');
sharePic.onclick = function () { sharePic.onclick = function () {
......
...@@ -57,8 +57,8 @@ export default class SceneCtrl { ...@@ -57,8 +57,8 @@ export default class SceneCtrl {
this.mapscene = new MapScene(data); this.mapscene = new MapScene(data);
if (!window['development']) { if (!window['development']) {
const promise = Promise.all([ const promise = Promise.all([
RES.getResAsync(`${'Map'}_json`), RES.getResAsync(`${'map'}_json`),
RES.getResAsync(`${'Map'}_png`)]); RES.getResAsync(`${'map'}_png`)]);
promise.then(() => { promise.then(() => {
this.showAfterLoadAtlas(this.mapscene, data, onComplete); this.showAfterLoadAtlas(this.mapscene, data, onComplete);
}); });
......
...@@ -1532,7 +1532,7 @@ export default class MainScene extends Scene { ...@@ -1532,7 +1532,7 @@ export default class MainScene extends Scene {
//初始化引导,游戏和道具 //初始化引导,游戏和道具
initGuide() { initGuide() {
//游戏引导 //游戏引导
const gameGuideChapterNum = [1, 2, 3, 5, 8, 9, 10, 12, 17, 25, 41, 61, 101, 121, 226, 301,331, 377, 406, 426, 453, 501, 556, 601]; const gameGuideChapterNum = [1, 2, 3, 5, 8, 9, 10, 12, 17, 25, 41, 61, 101, 121, 226, 301,331, 377, 406, 426, 453, 501, 556, 601,661];
if (gameGuideChapterNum.indexOf(this.chapter >> 0) > -1) { if (gameGuideChapterNum.indexOf(this.chapter >> 0) > -1) {
if (!readCache(getCacheKey() + this.chapter)) { if (!readCache(getCacheKey() + this.chapter)) {
this.gameGuide = new GameGuide(this); this.gameGuide = new GameGuide(this);
...@@ -1651,7 +1651,7 @@ export default class MainScene extends Scene { ...@@ -1651,7 +1651,7 @@ export default class MainScene extends Scene {
removeEvents() { removeEvents() {
console.log('mainscene-------removeEvents'); // console.log('mainscene-------removeEvents');
this.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this); this.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
this.settingBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_settingBtn, this); this.settingBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_settingBtn, this);
this.questionBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this) this.questionBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this)
...@@ -1694,7 +1694,7 @@ export default class MainScene extends Scene { ...@@ -1694,7 +1694,7 @@ export default class MainScene extends Scene {
this.cannoEffect = new Array(); this.cannoEffect = new Array();
} }
destroy() { destroy() {
console.log("mainscene-------------destroy"); // console.log("mainscene-------------destroy");
super.destroy(); super.destroy();
} }
...@@ -3176,7 +3176,7 @@ export default class MainScene extends Scene { ...@@ -3176,7 +3176,7 @@ export default class MainScene extends Scene {
//如果早已通关,正在结算 //如果早已通关,正在结算
if(this.hasPassed) { if(this.hasPassed) {
console.log("结算检测---------------------弹窗检测3"); // console.log("结算检测---------------------弹窗检测3");
//如果原先特效还有, //如果原先特效还有,
if(!this.isCountingTime) { if(!this.isCountingTime) {
this.terminateSteps(); this.terminateSteps();
...@@ -3185,7 +3185,7 @@ export default class MainScene extends Scene { ...@@ -3185,7 +3185,7 @@ export default class MainScene extends Scene {
else { else {
//通关了 //通关了
//提交分数等 //提交分数等
console.log("结算检测---------------------弹窗检测4"); // console.log("结算检测---------------------弹窗检测4");
var json = this.getSubmitJson() var json = this.getSubmitJson()
this.submit(json) this.submit(json)
} }
...@@ -3230,7 +3230,7 @@ export default class MainScene extends Scene { ...@@ -3230,7 +3230,7 @@ export default class MainScene extends Scene {
this.effectContinuityTimes = 0; this.effectContinuityTimes = 0;
//判断步数是否为0; //判断步数是否为0;
if(this.steps == 0) { if(this.steps == 0) {
console.log("结算检测---------------------失败弹窗检测1"); // console.log("结算检测---------------------失败弹窗检测1");
//失败弹框 //失败弹框
// playSound(SoundType.fail); // playSound(SoundType.fail);
var panelsDatas = this.returnPanels("failed", {level: this.chapter}) var panelsDatas = this.returnPanels("failed", {level: this.chapter})
...@@ -3498,7 +3498,7 @@ export default class MainScene extends Scene { ...@@ -3498,7 +3498,7 @@ export default class MainScene extends Scene {
if(inidx!=-1){ if(inidx!=-1){
this.wormFireworks.splice(inidx,1); this.wormFireworks.splice(inidx,1);
if(this.wormFireworks.length==0&&this._checkMtag.wormhole&&!this.incheckFall){ if(this.wormFireworks.length==0&&this._checkMtag.wormhole&&!this.incheckFall){
console.log("黑洞上的烟花播放完毕"); // console.log("黑洞上的烟花播放完毕");
this.aiMotionCheckDieMap(); this.aiMotionCheckDieMap();
} }
} }
...@@ -3507,23 +3507,23 @@ export default class MainScene extends Scene { ...@@ -3507,23 +3507,23 @@ export default class MainScene extends Scene {
* 果冻蔓延和气泡变色需要重新检查死图 * 果冻蔓延和气泡变色需要重新检查死图
*/ */
async aiMotionCheckDieMap() { async aiMotionCheckDieMap() {
console.log("重置点击验证"); // console.log("重置点击验证");
this.incheckFall = false; this.incheckFall = false;
//黑洞转移 //黑洞转移
if(this._checkMtag.wormhole){ if(this._checkMtag.wormhole){
let wormholes = this.chapterData.map.WORMHOLE; let wormholes = this.chapterData.map.WORMHOLE;
if(wormholes&&wormholes.length>0){ if(wormholes&&wormholes.length>0){
console.log("虫洞位移检测",this.wormHolePromise.length); // console.log("虫洞位移检测",this.wormHolePromise.length);
if(this.wormFireworks.length>0){ if(this.wormFireworks.length>0){
return console.error("等待烟花放完"); return// console.error("等待烟花放完");
} }
this._checkMtag.wormhole = false; this._checkMtag.wormhole = false;
await Promise.all(this.wormHolePromise).then(()=>{ await Promise.all(this.wormHolePromise).then(()=>{
console.log("动画完毕"); // console.log("动画完毕");
}); });
console.log("开始黑洞转移"); // console.log("开始黑洞转移");
await doWormHoleAI(this); await doWormHoleAI(this);
// console.log("黑洞转移完毕"); // console.log("黑洞转移完毕");
...@@ -3572,7 +3572,7 @@ export default class MainScene extends Scene { ...@@ -3572,7 +3572,7 @@ export default class MainScene extends Scene {
showToast("元素已无法消除") showToast("元素已无法消除")
setTimeout(() => { setTimeout(() => {
// playSound(SoundType.fail); // playSound(SoundType.fail);
console.log("结算检测---------------------失败弹窗检测2"); // console.log("结算检测---------------------失败弹窗检测2");
var panelsDatas = this.returnPanels("failed", {level: this.chapter}) var panelsDatas = this.returnPanels("failed", {level: this.chapter})
PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => {
}); });
...@@ -3592,7 +3592,7 @@ export default class MainScene extends Scene { ...@@ -3592,7 +3592,7 @@ export default class MainScene extends Scene {
this.gameGuide.show() this.gameGuide.show()
} }
; ;
console.log("重置点击222"); // console.log("重置点击222");
//允许移动 //允许移动
this.enableMouseEvt(true); this.enableMouseEvt(true);
//检查是否有红包炸弹弹框;有就弹出;然后置空 //检查是否有红包炸弹弹框;有就弹出;然后置空
...@@ -4395,7 +4395,7 @@ export default class MainScene extends Scene { ...@@ -4395,7 +4395,7 @@ export default class MainScene extends Scene {
} }
//如果特效有,消除特效 //如果特效有,消除特效
if(effectElements.length) { if(effectElements.length) {
console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements)); // console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements));
Array.prototype.push.apply(this.eliminatedElements, effectElements); Array.prototype.push.apply(this.eliminatedElements, effectElements);
this.eliminate(); this.eliminate();
} else { } else {
...@@ -4404,11 +4404,11 @@ export default class MainScene extends Scene { ...@@ -4404,11 +4404,11 @@ export default class MainScene extends Scene {
this.score += 1000 * this.steps; this.score += 1000 * this.steps;
this.steps = 0; this.steps = 0;
var json = this.getSubmitJson() var json = this.getSubmitJson()
console.log("结算检测---------------------弹窗检测5"); // console.log("结算检测---------------------弹窗检测5");
this.submit(json) this.submit(json)
return return
} }
console.log("结算检测-------------------结算飞星"); // console.log("结算检测-------------------结算飞星");
this.isCountingTime = true; this.isCountingTime = true;
let countAll = Math.min(this.steps, elements.length); let countAll = Math.min(this.steps, elements.length);
let count = 0; let count = 0;
...@@ -4720,7 +4720,7 @@ export default class MainScene extends Scene { ...@@ -4720,7 +4720,7 @@ export default class MainScene extends Scene {
//动画 //动画
let pro = this.playAni(RecoverName.ICE_ANI, p); let pro = this.playAni(RecoverName.ICE_ANI, p);
if(this._checkMtag.wormhole&&Tool.judgeInWormHole(lat.index,this.chapterData.map.WORMHOLE)){ if(this._checkMtag.wormhole&&Tool.judgeInWormHole(lat.index,this.chapterData.map.WORMHOLE)){
console.log("冰块pro",lat.index); // console.log("冰块pro",lat.index);
this.wormHolePromise.push(pro); this.wormHolePromise.push(pro);
} }
} else if(lat.block && lat.block.ice && lat.block.canIceBroken && lat.block.ice.alpha!=0) {//石门(可能带冰) && 石门反转了可以消除了 } else if(lat.block && lat.block.ice && lat.block.canIceBroken && lat.block.ice.alpha!=0) {//石门(可能带冰) && 石门反转了可以消除了
...@@ -4738,7 +4738,7 @@ export default class MainScene extends Scene { ...@@ -4738,7 +4738,7 @@ export default class MainScene extends Scene {
//动画 //动画
let pro = this.playAni(RecoverName.ICE_ANI, p); let pro = this.playAni(RecoverName.ICE_ANI, p);
if(this._checkMtag.wormhole&&Tool.judgeInWormHole(lat.index,this.chapterData.map.WORMHOLE)){ if(this._checkMtag.wormhole&&Tool.judgeInWormHole(lat.index,this.chapterData.map.WORMHOLE)){
console.log("石门冰块pro",lat.index); // console.log("石门冰块pro",lat.index);
this.wormHolePromise.push(pro); this.wormHolePromise.push(pro);
} }
} else if(lat.sand) { } else if(lat.sand) {
...@@ -4814,7 +4814,7 @@ export default class MainScene extends Scene { ...@@ -4814,7 +4814,7 @@ export default class MainScene extends Scene {
let isInworm = Tool.judgeInWormHole(index,this.chapterData.map.WORMHOLE); let isInworm = Tool.judgeInWormHole(index,this.chapterData.map.WORMHOLE);
if(isInworm&&this._checkMtag.wormhole){ if(isInworm&&this._checkMtag.wormhole){
console.error("添加烟花pro",lat.index); // console.error("添加烟花pro",lat.index);
// this.wormHolePromise.push(pro); // this.wormHolePromise.push(pro);
if(this.wormFireworks.indexOf(index)==-1){ if(this.wormFireworks.indexOf(index)==-1){
this.wormFireworks.push(index); this.wormFireworks.push(index);
...@@ -5278,7 +5278,7 @@ export default class MainScene extends Scene { ...@@ -5278,7 +5278,7 @@ export default class MainScene extends Scene {
//播放动效 //播放动效
let pro = this.playAni(RecoverName.ROCK_ANI, Tool.getPositionByIndex(index)) let pro = this.playAni(RecoverName.ROCK_ANI, Tool.getPositionByIndex(index))
if(this._checkMtag.wormhole&&Tool.judgeInWormHole(index,this.chapterData.map.WORMHOLE)){ if(this._checkMtag.wormhole&&Tool.judgeInWormHole(index,this.chapterData.map.WORMHOLE)){
console.log("石头裂开pro",index); // console.log("石头裂开pro",index);
this.wormHolePromise.push(pro); this.wormHolePromise.push(pro);
} }
} }
......
This diff is collapsed.
import { ChapterData } from "../interface/ChapterData";
//676-700
export const Chapters27: ChapterData[] = [
]
...@@ -28,7 +28,7 @@ import { Chapters23 } from "./Chapter23"; ...@@ -28,7 +28,7 @@ import { Chapters23 } from "./Chapter23";
import { Chapters24 } from "./Chapter24"; import { Chapters24 } from "./Chapter24";
import { Chapters25 } from "./Chapter25"; import { Chapters25 } from "./Chapter25";
import { Chapters26 } from "./Chapter26"; import { Chapters26 } from "./Chapter26";
import { Chapters27 } from "./Chapter27";
//所有的关卡 //所有的关卡
const chapters: ChapterData[] = [].concat( const chapters: ChapterData[] = [].concat(
Chapters1, Chapters1,
...@@ -56,7 +56,8 @@ const chapters: ChapterData[] = [].concat( ...@@ -56,7 +56,8 @@ const chapters: ChapterData[] = [].concat(
Chapters23, Chapters23,
Chapters24, Chapters24,
Chapters25, Chapters25,
Chapters26 Chapters26,
Chapters27
) )
// console.log(chapters) // console.log(chapters)
chapters.forEach((chapter,index) => { chapters.forEach((chapter,index) => {
......
...@@ -27,7 +27,7 @@ export default class WormHole extends egret.Sprite{ ...@@ -27,7 +27,7 @@ export default class WormHole extends egret.Sprite{
} }
initSvga(){ initSvga(){
if(wormvideo){ if(wormvideo){
console.log("复用黑洞数据"); // console.log("复用黑洞数据");
this.createWormHole(); this.createWormHole();
}else{ }else{
if (!svgaParser) svgaParser = new window["SVGA"].Parser(); if (!svgaParser) svgaParser = new window["SVGA"].Parser();
...@@ -41,20 +41,25 @@ export default class WormHole extends egret.Sprite{ ...@@ -41,20 +41,25 @@ export default class WormHole extends egret.Sprite{
} }
createWormHole(){ createWormHole(){
this.wormHoleClip = new window["SVGA"].EgretMovieClip(wormvideo); this.wormHoleClip = new window["SVGA"].EgretMovieClip(wormvideo);
var mvwidth = 82;
var mvheight = 82; var mscale = 1.08
this.wormHoleClip.scaleX = mscale;
this.wormHoleClip.scaleY = mscale;
var mvwidth = 78*mscale;
var mvheight = 78*mscale;
this.wormHoleClip.x = -mvwidth/2; this.wormHoleClip.x = -mvwidth/2;
this.wormHoleClip.y = -mvwidth/2; this.wormHoleClip.y = -mvwidth/2;
this.addChild(this.wormHoleClip); this.addChild(this.wormHoleClip);
this.wormHoleClip.gotoAndStop(1); this.wormHoleClip.gotoAndStop(1);
this.wormHoleClip.addEventListener(egret.Event.ENTER_FRAME,this.toFrameAni,this); this.wormHoleClip.addEventListener(egret.Event.ENTER_FRAME,this.toFrameAni,this);
console.log("添加黑洞",this.wormHoleClip); // console.log("添加黑洞",this.wormHoleClip);
} }
toFrameAni(){ toFrameAni(){
var curframe = this.wormHoleClip.currentFrame; var curframe = this.wormHoleClip.currentFrame;
if(curframe==123){ if(curframe==81){
var endtime = new Date().getTime(); var endtime = new Date().getTime();
console.log("passtime",endtime-this.playtime); // console.log("passtime",endtime-this.playtime);
this.wormHoleClip.gotoAndStop(1); this.wormHoleClip.gotoAndStop(1);
} }
} }
......
...@@ -239,7 +239,7 @@ export class AiControl { ...@@ -239,7 +239,7 @@ export class AiControl {
if (!lattice || !lattice.element || lattice.element.type != ElementType.JELLY || (lattice.block && lattice.block.isLock())) continue if (!lattice || !lattice.element || lattice.element.type != ElementType.JELLY || (lattice.block && lattice.block.isLock())) continue
indexs.push(i); indexs.push(i);
} }
console.log('没有被锁的果冻数量', indexs.length, '被锁果冻数量', blocked.length) // console.log('没有被锁的果冻数量', indexs.length, '被锁果冻数量', blocked.length)
//如果没有果冻,直接回调 //如果没有果冻,直接回调
if (!indexs.length && blocked.length == 0) { if (!indexs.length && blocked.length == 0) {
//标记为无果冻 //标记为无果冻
...@@ -379,7 +379,7 @@ export class AiControl { ...@@ -379,7 +379,7 @@ export class AiControl {
}) })
}) })
if(thisObj._checkMtag.wormhole){ if(thisObj._checkMtag.wormhole){
console.log("蛋壳pro",activeEggIndex); // console.log("蛋壳pro",activeEggIndex);
thisObj.wormHolePromise.push(pro); thisObj.wormHolePromise.push(pro);
} }
......
...@@ -573,6 +573,21 @@ const chapterFuns = { ...@@ -573,6 +573,21 @@ const chapterFuns = {
"在藤蔓周围消除,\n解救猩猩会有惊喜哦~" "在藤蔓周围消除,\n解救猩猩会有惊喜哦~"
] ]
}, },
661:{
stepCount: 1,
showIndexs: [
[1, 10, 11, 19],
],
hideIndexs: [
[1, 19],
],
handIndexs: [
[10, 11],
],
msg: [
"每消除一步,黑洞两端\n的元素就会交换一次哦"
]
}
}; };
/** /**
......
...@@ -3388,6 +3388,131 @@ ...@@ -3388,6 +3388,131 @@
"levelNum": 675, "levelNum": 675,
"maxScore": 47440, "maxScore": 47440,
"stars": 1 "stars": 1
},
{
"levelNum": 676,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 677,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 678,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 679,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 680,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 681,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 682,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 683,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 684,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 685,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 686,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 687,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 688,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 689,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 690,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 691,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 692,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 693,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 694,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 695,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 696,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 697,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 698,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 699,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 700,
"maxScore": 47440,
"stars": 1
} }
], ],
"remainProp": [ "remainProp": [
......
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