Commit 2175ec93 authored by zjz1994's avatar zjz1994
parents c80cbe55 881f1760
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,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 * 36; window['total_level'] = 8 + 3 + 22 * 39;
window['last_level'] = 800; window['last_level'] = 850;
var sharePic = document.getElementById('pic'); var sharePic = document.getElementById('pic');
sharePic.onclick = function () { sharePic.onclick = function () {
......
...@@ -326,6 +326,15 @@ export default class MainBase extends eui.UILayer { ...@@ -326,6 +326,15 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele43fn_png"); RES.getResAsync("ele43fn_png");
RES.getResAsync("ele44fn_png"); RES.getResAsync("ele44fn_png");
RES.getResAsync("ele45fn_png"); RES.getResAsync("ele45fn_png");
RES.getResAsync("ele46_png");
RES.getResAsync("ele46_1_png");
RES.getResAsync("ele46_2_png");
RES.getResAsync("ele46_3_png");
RES.getResAsync("ele46_4_png");
RES.getResAsync("ele46_5_png");
RES.getResAsync("ele46_6_png");
RES.getResAsync("ele46_sz_png");
for (var i = 1; i <= 27; i++) { for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png") RES.getResAsync("bonusFra" + i + "_png")
......
...@@ -619,7 +619,7 @@ export class DataManager extends ABDataManager { ...@@ -619,7 +619,7 @@ export class DataManager extends ABDataManager {
default: default:
if(name=="hc_advert"){ if(name=="hc_advert"){
this[this.getKey(name+"_"+param.type)] = result; this[this.getKey(name+"_"+param.type)] = result;
console.log("新广告,分展示位单个区别获取",name,result,param); // console.log("新广告,分展示位单个区别获取",name,result,param);
}else{ }else{
this[this.getKey(name)] = result; this[this.getKey(name)] = result;
} }
......
This diff is collapsed.
This diff is collapsed.
export class elementEffect{
}
\ No newline at end of file
...@@ -316,8 +316,10 @@ export default class MapScene extends Scene { ...@@ -316,8 +316,10 @@ export default class MapScene extends Scene {
} }
this.scrollMapy.push(smaph+mapbot_height); this.scrollMapy.push(smaph+mapbot_height);
// console.log(maptop_height,repeatnum,maprep_height,mapbot_height);
var scrollheight = maptop_height+repeatnum*maprep_height+mapbot_height; var scrollheight = maptop_height+repeatnum*maprep_height+mapbot_height;
// console.log("scroll--------height",scrollheight,this.scrollMapy); // console.log("scroll--------height",scrollheight,this.scrollMapy);
this.scroll.height = this.stage.stageHeight;
this.scrollGroup.height = scrollheight; this.scrollGroup.height = scrollheight;
var nowlevel = getHomeData().levels.length; var nowlevel = getHomeData().levels.length;
// console.log("玩家level",nowlevel); // console.log("玩家level",nowlevel);
...@@ -345,6 +347,7 @@ export default class MapScene extends Scene { ...@@ -345,6 +347,7 @@ export default class MapScene extends Scene {
if (homeData.levels.length >= window['total_level']) if (homeData.levels.length >= window['total_level'])
lastOrder = window['total_level']; lastOrder = window['total_level'];
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight); this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
// console.log("滚动设置",this.scroll.viewport.scrollV,this.scrollGroup.height,this.scroll.height,this.stage.stageHeight);
// console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV); // console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV);
this.setScrollVShow(); this.setScrollVShow();
// console.log('地图数据-----',this._data); // console.log('地图数据-----',this._data);
...@@ -822,13 +825,48 @@ export default class MapScene extends Scene { ...@@ -822,13 +825,48 @@ export default class MapScene extends Scene {
}else{ }else{
var joidx = i3%2; var joidx = i3%2;
//1对应onemapr,0对应twomapr //1对应onemapr,0对应twomapr
let onemapy:number;
let twomapy:number;
let cmap:number;
let onemapidx = this.scrollGroup.getChildIndex(this.onemapreppart);
let twomapidx = this.scrollGroup.getChildIndex(this.twomapreppart);
let maxidx = Math.max(onemapidx,twomapidx);
let minidx = Math.min(onemapidx,twomapidx);
if(joidx==1){ if(joidx==1){
i3map = this.onemapreppart; i3map = this.onemapreppart;
cmap = 1;
onemapy = this.onemapreppart.y;
twomapy = this.twomapreppart.y;
}else{ }else{
i3map = this.twomapreppart; i3map = this.twomapreppart;
cmap = 2;
onemapy = this.onemapreppart.y;
twomapy = this.twomapreppart.y;
} }
if(i3map.y!=i3mapy){ if(i3map.y!=i3mapy){
i3map.y = i3mapy; i3map.y = i3mapy;
if(cmap==1){
if(i3mapy>twomapy){
this.scrollGroup.setChildIndex(this.onemapreppart,maxidx);
this.scrollGroup.setChildIndex(this.twomapreppart,minidx);
}else{
this.scrollGroup.setChildIndex(this.onemapreppart,minidx);
this.scrollGroup.setChildIndex(this.twomapreppart,maxidx);
}
}else{
if(i3mapy>onemapy){
this.scrollGroup.setChildIndex(this.onemapreppart,minidx);
this.scrollGroup.setChildIndex(this.twomapreppart,maxidx);
}else{
this.scrollGroup.setChildIndex(this.onemapreppart,maxidx);
this.scrollGroup.setChildIndex(this.twomapreppart,minidx);
}
}
var i3startlevel = MapTopPart.LEVEL_NUMS+(i3-1)*MapRpeatPart.LEVEL_NUMS; var i3startlevel = MapTopPart.LEVEL_NUMS+(i3-1)*MapRpeatPart.LEVEL_NUMS;
// console.log("局部显示",i3,i3mapy,i3startlevel,lidx,nidx); // console.log("局部显示",i3,i3mapy,i3startlevel,lidx,nidx);
......
...@@ -170,7 +170,7 @@ export default class StartPanel extends Panel { ...@@ -170,7 +170,7 @@ export default class StartPanel extends Panel {
wait(5000).then(() => { wait(5000).then(() => {
updateMainTimerAfterGetData(); updateMainTimerAfterGetData();
}); });
if(success) { // if(success) {
// Loading.instace.show(); // Loading.instace.show();
this.hidePanel(); this.hidePanel();
try { try {
...@@ -185,7 +185,7 @@ export default class StartPanel extends Panel { ...@@ -185,7 +185,7 @@ export default class StartPanel extends Panel {
// Loading.instace.hide(); // Loading.instace.hide();
SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, {chapter: this._level}); SceneCtrl.instance.change(ModuleTypes.MAIN_SCENE, {chapter: this._level});
StartPanel.currlevel = this._level StartPanel.currlevel = this._level
} // }
}, this._level); }, this._level);
......
...@@ -305,7 +305,9 @@ export class Tool { ...@@ -305,7 +305,9 @@ export class Tool {
// lat.element.type == ElementType.FESTIVALELE_SMALL // lat.element.type == ElementType.FESTIVALELE_SMALL
lat.element.type == ElementType.CANNO || lat.element.type == ElementType.CANNO ||
lat.element.type == ElementType.CANNO_BLOCK || lat.element.type == ElementType.CANNO_BLOCK ||
lat.element.type == ElementType.Pongo lat.element.type == ElementType.Pongo||
lat.element.type == ElementType.cherry
) { ) {
return false return false
} }
...@@ -370,7 +372,8 @@ export class Tool { ...@@ -370,7 +372,8 @@ export class Tool {
lat.element.type == ElementType.FIREWORKS_SHOOTER || lat.element.type == ElementType.FIREWORKS_SHOOTER ||
lat.element.type == ElementType.CANNO || lat.element.type == ElementType.CANNO ||
lat.element.type == ElementType.CANNO_BLOCK || lat.element.type == ElementType.CANNO_BLOCK ||
lat.element.type == ElementType.Pongo lat.element.type == ElementType.Pongo ||
lat.element.type == ElementType.cherry
) { ) {
return false return false
} }
...@@ -472,7 +475,9 @@ export class Tool { ...@@ -472,7 +475,9 @@ export class Tool {
ele.type == ElementType.FESTIVALELE_SMALL || ele.type == ElementType.FESTIVALELE_SMALL ||
ele.type == ElementType.CANNO || ele.type == ElementType.CANNO ||
ele.type == ElementType.CANNO_BLOCK || ele.type == ElementType.CANNO_BLOCK ||
ele.type == ElementType.Pongo ele.type == ElementType.Pongo||
ele.type == ElementType.cherry
) { ) {
return false; return false;
} }
...@@ -501,7 +506,8 @@ export class Tool { ...@@ -501,7 +506,8 @@ export class Tool {
ele.hasState(StateType.HAIRBALLBROWN) || ele.hasState(StateType.HAIRBALLBROWN) ||
ele.type == ElementType.CANNO || ele.type == ElementType.CANNO ||
ele.type == ElementType.CANNO_BLOCK || ele.type == ElementType.CANNO_BLOCK ||
ele.type == ElementType.Pongo ele.type == ElementType.Pongo||
ele.type == ElementType.cherry
) { ) {
return false; return false;
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -33,6 +33,8 @@ import { Chapters28 } from "./Chapter28"; ...@@ -33,6 +33,8 @@ import { Chapters28 } from "./Chapter28";
import { Chapters29 } from "./Chapter29"; import { Chapters29 } from "./Chapter29";
import { Chapters30 } from "./Chapter30"; import { Chapters30 } from "./Chapter30";
import { Chapters31 } from "./Chapter31"; import { Chapters31 } from "./Chapter31";
import { Chapters32 } from "./Chapter32";
import { Chapters33 } from "./Chapter33";
//所有的关卡 //所有的关卡
const chapters: ChapterData[] = [].concat( const chapters: ChapterData[] = [].concat(
Chapters1, Chapters1,
...@@ -65,7 +67,9 @@ const chapters: ChapterData[] = [].concat( ...@@ -65,7 +67,9 @@ const chapters: ChapterData[] = [].concat(
Chapters28, Chapters28,
Chapters29, Chapters29,
Chapters30, Chapters30,
Chapters31 Chapters31,
Chapters32,
Chapters33
) )
// console.log(chapters) // console.log(chapters)
chapters.forEach((chapter,index) => { chapters.forEach((chapter,index) => {
...@@ -85,8 +89,8 @@ chapters.forEach((chapter,index) => { ...@@ -85,8 +89,8 @@ chapters.forEach((chapter,index) => {
* @param index 关数 从1开始 * @param index 关数 从1开始
*/ */
export function getChapterData(index: number): ChapterData { export function getChapterData(index: number): ChapterData {
// return chapters[801];
//没有数据就返回第一关数据 //没有数据就返回第一关数据
// return chapters[751];
return chapters[index] || chapters[1]; return chapters[index] || chapters[1];
} }
......
...@@ -872,6 +872,8 @@ export class Element extends eui.Component { ...@@ -872,6 +872,8 @@ export class Element extends eui.Component {
//模拟炮台发射情况 //模拟炮台发射情况
protected cannolab: eui.Label; protected cannolab: eui.Label;
//樱花阶段绽放
public cherrystat:number = 1;
/** /**
* *
* @param type 只应该是基础元素和特殊元素 * @param type 只应该是基础元素和特殊元素
...@@ -883,9 +885,16 @@ export class Element extends eui.Component { ...@@ -883,9 +885,16 @@ export class Element extends eui.Component {
if(type==ElementType.Pongo){//猩猩不设默认图 if(type==ElementType.Pongo){//猩猩不设默认图
}else{
if(this.type==ElementType.cherry){
this.cherrystat = 1;
this.activeStatus = 0;
this.isInCherryAni = false;
this.setCherryImg();
}else{ }else{
this.changeSource("ele" + this.type + "_png"); this.changeSource("ele" + this.type + "_png");
} }
}
this.addChild(this.showImage); this.addChild(this.showImage);
...@@ -1007,6 +1016,7 @@ export class Element extends eui.Component { ...@@ -1007,6 +1016,7 @@ export class Element extends eui.Component {
* @param type 只应该是基础元素和特殊元素 * @param type 只应该是基础元素和特殊元素
*/ */
reset(type: ElementType) { reset(type: ElementType) {
this.effectType = null; this.effectType = null;
this._isMonsterJelly=false; this._isMonsterJelly=false;
this._isNeb = false; this._isNeb = false;
...@@ -1023,6 +1033,9 @@ export class Element extends eui.Component { ...@@ -1023,6 +1033,9 @@ export class Element extends eui.Component {
this.showImage.visible = type != ElementType.CANNO; this.showImage.visible = type != ElementType.CANNO;
this.cannolab.visible = false; this.cannolab.visible = false;
this.inPongoPart = null; this.inPongoPart = null;
this.cherrystat = 1;
this.activeStatus = 0;
this.isInCherryAni = false;
//重置element //重置element
if(this._mv&&this._mv.parent){ if(this._mv&&this._mv.parent){
this._mv.removeEventListener(egret.Event.ENTER_FRAME,this._mvEnterFrame1,this); this._mv.removeEventListener(egret.Event.ENTER_FRAME,this._mvEnterFrame1,this);
...@@ -1053,9 +1066,13 @@ export class Element extends eui.Component { ...@@ -1053,9 +1066,13 @@ export class Element extends eui.Component {
if(type==ElementType.Pongo||type==ElementType.CANNO){ if(type==ElementType.Pongo||type==ElementType.CANNO){
}else{
if(this.type==ElementType.cherry){
this.setCherryImg();
}else{ }else{
this.changeSource("ele" + type + "_png"); this.changeSource("ele" + type + "_png");
} }
}
//特效重置 //特效重置
this.effectType = null; this.effectType = null;
this.temEffectType = null; this.temEffectType = null;
...@@ -1314,4 +1331,30 @@ export class Element extends eui.Component { ...@@ -1314,4 +1331,30 @@ export class Element extends eui.Component {
onElimiate(){} onElimiate(){}
get isActive() { return false } get isActive() { return false }
canElimite:boolean; canElimite:boolean;
//樱花显示
setCherryImg(){
this.changeSource("ele46_"+this.cherrystat + "_png");
}
//激活樱花
activeStatus:number = 0;//0未激活,1绽放中,2,结束
//樱花动画播放状态
isInCherryAni:boolean = false;
//樱花到下一阶段
addCherryStat(){
if(this.cherrystat<6&&!this.isInCherryAni){
this.cherrystat += 1;
this.isInCherryAni = true;
this.setCherryImg();
this.showImage.alpha = 0;
}
}
activeCherry(){
this.activeStatus = 1;
this.showImage.alpha = 0;
}
//樱花消失
dieCherry(){
this.activeStatus = 2;
}
} }
\ No newline at end of file
export default class shuzhi extends egret.Bitmap{
constructor(){
super();
var texture:egret.Texture = RES.getRes("ele46_sz_png");
if(!texture){
console.error("检查树枝纹理");
return;
};
this.texture = texture;
this.anchorOffsetX = texture.textureWidth/2;
this.anchorOffsetY = texture.textureHeight/2;
this.touchEnabled = false;
}
//树枝旋转,hor横向树枝,vir竖向树枝
setroa(type:string){
var roa:number = 0;
if(type=="hor"){
roa = 0;
}else if(type=="vir"){
roa = 90;
}
this.rotation = roa;
}
}
\ No newline at end of file
...@@ -72,6 +72,9 @@ export enum ElementType { ...@@ -72,6 +72,9 @@ export enum ElementType {
// food2,//43 饼干 // food2,//43 饼干
// food3,//44 寿司 // food3,//44 寿司
// food4,//45 雪糕 // food4,//45 雪糕
cherry,//46 樱花
} }
export const isMonsterEle = (t: ElementType) => { export const isMonsterEle = (t: ElementType) => {
......
...@@ -33,4 +33,8 @@ export interface ChapterData { ...@@ -33,4 +33,8 @@ export interface ChapterData {
* 星数对应的分数,数组长度为3 * 星数对应的分数,数组长度为3
*/ */
starScores: number[]; starScores: number[];
/**
* 樱花
*/
cherrydata?:number[][];
} }
\ No newline at end of file
...@@ -681,6 +681,37 @@ const chapterFuns = { ...@@ -681,6 +681,37 @@ const chapterFuns = {
"原来是一块饼干,继续消除它身上的冰块吧~" "原来是一块饼干,继续消除它身上的冰块吧~"
] ]
}, },
801:{
stepCount: 3,
showIndexs: [
[6,15,24,25],
[30,31,32,33],
[6,15,24,33],
// [6,15,24,33],
// [6,15,24,33],
],
hideIndexs: [
[6,15],
[30,31],
[6,15],
// [6,15],
// [24,33],
],
handIndexs: [
[24,25],
[32,33],
[24,33],
// [24,33],
// [6,15],
],
msg: [
"在樱花旁边消除一次看看会发生什么~",
"哇哦,樱花它开花了!再移动一步试试~",
"加油,继续在樱花旁边消除让它开花吧~",
// "樱花引导4",
// "樱花引导5"
]
},
}; };
/** /**
......
...@@ -4013,6 +4013,256 @@ ...@@ -4013,6 +4013,256 @@
"levelNum": 800, "levelNum": 800,
"maxScore": 47440, "maxScore": 47440,
"stars": 1 "stars": 1
},
{
"levelNum": 801,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 802,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 803,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 804,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 805,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 806,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 807,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 808,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 809,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 810,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 811,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 812,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 813,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 814,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 815,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 816,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 817,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 818,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 819,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 820,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 821,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 822,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 823,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 824,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 825,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 826,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 827,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 828,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 829,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 830,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 831,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 832,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 833,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 834,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 835,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 836,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 837,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 838,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 839,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 840,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 841,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 842,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 843,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 844,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 845,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 846,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 847,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 848,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 849,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 850,
"maxScore": 47440,
"stars": 1
} }
], ],
"remainProp": [ "remainProp": [
...@@ -4029,7 +4279,7 @@ ...@@ -4029,7 +4279,7 @@
"num": 3 "num": 3
} }
], ],
"remainEnargy": 27, "remainEnargy": 2,
"askForEnergy": false, "askForEnergy": false,
"refectionCountdown": 77777, "refectionCountdown": 77777,
"canReceiveTreasureBoxNum": 10, "canReceiveTreasureBoxNum": 10,
......
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