Commit 741d00ef authored by zjz1994's avatar zjz1994

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

parents be58e00b fb03a06e
......@@ -127,8 +127,8 @@
// localStorage.clear();
window['imgver'] = '11112';
//top 8 ,repeat 22 , bottom 3
window['total_level'] = 8 + 3 + 22 * 27;
window['last_level'] = 600;
window['total_level'] = 8 + 3 + 22 * 28;
window['last_level'] = 625;
var sharePic = document.getElementById('pic');
sharePic.onclick = function () {
......
......@@ -311,6 +311,8 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele36_png");
RES.getResAsync("ele38_png");
RES.getResAsync("ele39_png");
RES.getResAsync("ele40_png");
RES.getResAsync("kuang_png");
for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png")
}
......
......@@ -5386,6 +5386,16 @@
"url": "assets/hbPrize/hbp_bg.png",
"type": "image",
"name": "hbp_bg_png"
},
{
"url": "assets/mainScene/ele40.png",
"type": "image",
"name": "ele40_png"
},
{
"url": "assets/mainScene/kuang.png",
"type": "image",
"name": "kuang_png"
}
]
}
\ No newline at end of file
This diff is collapsed.
......@@ -63,13 +63,14 @@ const judgeActionIndex = (index: number, lattices: Lattice[]): number => {
while (arr.length) {
var rand = Math.floor(Math.random() * arr.length);
var i = arr.splice(rand, 1)[0];
if (Tool.judgeBaseEle(lattices[i]) &&
if ((Tool.judgeBaseEle(lattices[i]) &&
!lattices[i].element.hasAnyState() &&
!lattices[i].element.candy &&
!lattices[i].sand &&
!lattices[i].block &&
!lattices[i].ice &&
!lattices[i].element.monster
!lattices[i].element.monster)||
(lattices[i]&&lattices[i].element&&lattices[i].element.inPongoPart)//猩猩支持流沙
) {
return i
}
......
......@@ -302,7 +302,8 @@ export class Tool {
lat.element.type == ElementType.FESTIVALELE_BIG ||
// lat.element.type == ElementType.FESTIVALELE_SMALL
lat.element.type == ElementType.CANNO ||
lat.element.type == ElementType.CANNO_BLOCK
lat.element.type == ElementType.CANNO_BLOCK ||
lat.element.type == ElementType.Pongo
) {
return false
}
......@@ -366,7 +367,8 @@ export class Tool {
lat.element.type == ElementType.JELLY_MONSTER ||
lat.element.type == ElementType.FIREWORKS_SHOOTER ||
lat.element.type == ElementType.CANNO ||
lat.element.type == ElementType.CANNO_BLOCK
lat.element.type == ElementType.CANNO_BLOCK ||
lat.element.type == ElementType.Pongo
) {
return false
}
......@@ -467,7 +469,8 @@ export class Tool {
ele.type == ElementType.FESTIVALELE_BIG ||
ele.type == ElementType.FESTIVALELE_SMALL ||
ele.type == ElementType.CANNO ||
ele.type == ElementType.CANNO_BLOCK
ele.type == ElementType.CANNO_BLOCK ||
ele.type == ElementType.Pongo
) {
return false;
}
......@@ -495,7 +498,8 @@ export class Tool {
ele.hasState(StateType.HAIRBALLBLACK) ||
ele.hasState(StateType.HAIRBALLBROWN) ||
ele.type == ElementType.CANNO ||
ele.type == ElementType.CANNO_BLOCK
ele.type == ElementType.CANNO_BLOCK ||
ele.type == ElementType.Pongo
) {
return false;
}
......@@ -517,7 +521,8 @@ export class Tool {
ele.hasState(StateType.HAIRBALLBLACK) ||
ele.hasState(StateType.HAIRBALLBROWN) ||
ele.type == ElementType.CANNO ||
ele.type == ElementType.CANNO_BLOCK
ele.type == ElementType.CANNO_BLOCK ||
ele.type == ElementType.Pongo
) {
return false;
}
......
This diff is collapsed.
......@@ -25,6 +25,7 @@ import { Chapters20 } from "./Chapter20";
import { Chapters21 } from "./Chapter21";
import { Chapters22 } from "./Chapter22";
import { Chapters23 } from "./Chapter23";
import { Chapters24 } from "./Chapter24";
//所有的关卡
const chapters: ChapterData[] = [].concat(
......@@ -51,6 +52,7 @@ const chapters: ChapterData[] = [].concat(
Chapters21,
Chapters22,
Chapters23,
Chapters24,
)
// console.log(chapters)
chapters.forEach((chapter,index) => {
......@@ -71,6 +73,7 @@ chapters.forEach((chapter,index) => {
*/
export function getChapterData(index: number): ChapterData {
//没有数据就返回第一关数据
// return chapters[612];
return chapters[index] || chapters[1];
}
......
This diff is collapsed.
......@@ -74,5 +74,5 @@ export enum ElementConfigType {
CANNO_DIR_RIGHT = 21,
/** 大炮石头 */
CANNO_BLOCK = 22,
xingxing = 23,
Pongo = 23,
}
\ No newline at end of file
......@@ -60,6 +60,7 @@ export enum ElementType {
FLOWER,//37
CANNO,//38
CANNO_BLOCK,//39
Pongo,//40
}
export const isMonsterEle = (t: ElementType) => {
......
......@@ -74,6 +74,7 @@ export enum RecoverName {
HAIRBALLGREY_STATE = "HairballGreyState",
HAIRBALLBLACK_STATE = "HairballBlackState",
HAIRBALLBROWN_STATE = "HairballBrownState",
PongoLock_State = "PongoLock_State",
BLOCK_STATE = "BLOCK_STATE",
......
......@@ -6,6 +6,7 @@ import { HairballBrownState } from "../states/HairballBrownState";
import { HairballBlackState } from "../states/HairballBlackState";
import { BlockLockState } from "../states/BlockLockState";
import { HoneyState } from "../states/HoneyState";
import { PongoLockState } from "../states/PongoLockState";
/**
* 状态类型
......@@ -18,6 +19,7 @@ export enum StateType {
HAIRBALLBLACK,//黑色毛球 ,两次消除,一次闭眼
BLOCK_LOCK,//石门盖住状态
HONEY,//蜂蜜
PongoLockState,//猩猩部位被封住
}
......@@ -30,4 +32,5 @@ export const stateDatas: { recoverName: RecoverName, className: any }[] = [
{ recoverName: RecoverName.HAIRBALLBLACK_STATE, className: HairballBlackState },
{ recoverName: RecoverName.BLOCK_STATE, className: BlockLockState },
{ recoverName: RecoverName.HONEY_STATE, className: HoneyState },
{ recoverName: RecoverName.PongoLock_State, className: PongoLockState },
]
\ No newline at end of file
import { State } from "../class/State";
import { Pool } from "../Pool";
import { RecoverName } from "../enum/RecoverName";
export class PongoLockState extends State{
private showImage:egret.Bitmap;
constructor() {
super();
this.showImage = new egret.Bitmap();
this.addChild(this.showImage);
}
/**
* 需要根据猩猩部分来区分显示
* @param inPongoPart
*/
reset(inPongoPart:string) {
this.once(egret.Event.ADDED,this.initShow,this);
}
initShow(){
this.alpha = 0;
var texture: egret.Texture = RES.getRes("lockVine_png");
this.showImage.texture = texture;
this.showImage.x = -texture.textureWidth / 2;
this.showImage.y = -texture.textureHeight / 2
}
recover() {
egret.Tween.get(this)
.to({ alpha: 0 }, 300)
.call(() => {
if (this.parent) this.parent.removeChild(this);
Pool.recover(RecoverName.PongoLock_State, this);
})
}
}
\ No newline at end of file
......@@ -3013,6 +3013,131 @@
"levelNum": 600,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 601,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 602,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 603,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 604,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 605,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 606,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 607,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 608,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 609,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 610,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 611,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 612,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 613,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 614,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 615,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 616,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 617,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 618,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 619,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 620,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 621,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 622,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 623,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 624,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 625,
"maxScore": 47440,
"stars": 1
}
],
"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