Commit 636b34c7 authored by wildfirecode's avatar wildfirecode

1

parent af656171
......@@ -135,8 +135,8 @@
];
// localStorage.clear();
window['imgver'] = '11112';
window['total_level'] = 10 + 10 * 27; /// TODO 14 不能变 总数必须大于总的关卡数
window['last_level'] = 275;//必须大于等于total_level ///TODO 标记最后一关,等于最后一关即可
window['total_level'] = 10 + 10 * 29; /// TODO 14 不能变 总数必须大于总的关卡数
window['last_level'] = 300;//必须大于等于total_level ///TODO 标记最后一关,等于最后一关即可
var sharePic = document.getElementById('pic');
......
......@@ -270,6 +270,9 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele" + i + "Line" + "_png")
RES.getResAsync("ele" + i + "Exp" + "_png")
}
for (var i = 0; i < 20; i++) {
RES.getResAsync("ele" + i + "_png")
}
for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png")
}
......@@ -503,10 +506,10 @@ export default class MainBase extends eui.UILayer {
protected async createGameScene() {
window['getaward'] = () => { getRedBombAward((param) => { console.log(param) }) };
localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'true'); // 任务中心强提示,每次进入游戏只强提示一次
await this.hcHome();
await Promise.all([
this.getAd(),
this.ajaxElement(),
this.hcHome(),
this.hc_userInfo(),
// this.getBackReward(),
this.hcRedBoobBaseInfo(),
......
{"file":"candynums.png","frames":{
"9":{"x":48,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"8":{"x":69,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"7":{"x":23,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"6":{"x":0,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"5":{"x":71,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"4":{"x":24,"y":0,"w":22,"h":27,"offX":0,"offY":0,"sourceW":22,"sourceH":27},
"3":{"x":46,"y":29,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"2":{"x":94,"y":0,"w":21,"h":27,"offX":0,"offY":0,"sourceW":21,"sourceH":27},
"1":{"x":92,"y":29,"w":14,"h":27,"offX":0,"offY":0,"sourceW":14,"sourceH":27},
"0":{"x":0,"y":0,"w":22,"h":27,"offX":0,"offY":0,"sourceW":22,"sourceH":27}}}
\ No newline at end of file
......@@ -227,6 +227,10 @@
{
"keys": "redbombalert文案_png,redAlert_btn_png,alert_yb_png,alert_prop3_png,alert_prop2_png,alert_prop1_png,alert_blood_png",
"name": "redbombalert"
},
{
"name": "preload",
"keys": "ele15_png,ele16_png,ele17_png,ele18_png,ele19_png"
}
],
"resources": [
......@@ -4096,6 +4100,41 @@
"type": "sheet",
"name": "top9_json",
"subkeys": "草绿_00000,草绿_00001,草绿_00002,草绿_00003,草绿_00004,草绿_00005,草绿_00006,草绿_00007,草绿_00008,草绿_00009,草绿_00010,草绿_00011,草绿_00012,草绿_00013,草绿_00014"
},
{
"url": "assets/common/candynums.png",
"type": "image",
"name": "candynums_png"
},
{
"url": "assets/common/candynums.fnt",
"type": "font",
"name": "candynums_fnt"
},
{
"name": "ele15_png",
"type": "image",
"url": "assets/mainScene/ele15.png"
},
{
"name": "ele16_png",
"type": "image",
"url": "assets/mainScene/ele16.png"
},
{
"name": "ele17_png",
"type": "image",
"url": "assets/mainScene/ele17.png"
},
{
"name": "ele18_png",
"type": "image",
"url": "assets/mainScene/ele18.png"
},
{
"name": "ele19_png",
"type": "image",
"url": "assets/mainScene/ele19.png"
}
]
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import { ExmlPlugin2 } from "./ExmlPlugin2";
export class MyExmlPlugin extends ExmlPlugin2 implements plugins.Command {
async onFile(file: plugins.File) {
const excludes = [
'candynums.png',
'top1.png',
'top2.png',
'top3.png',
......
......@@ -39,7 +39,7 @@ import { Element } from '../something/class/Element';
import { Ice } from '../something/class/Ice';
import { Lattice } from '../something/class/Lattice';
import { EffectType } from '../something/enum/EffectType';
import { ElementConfigType } from '../something/enum/ElementConfigType';
import { ElementConfigType, createCandy } from '../something/enum/ElementConfigType';
import { codeMsgs, ElementType, FiveBaseElementTypes, submitTran } from '../something/enum/ElementType';
import { isIce, isSpecialLattice } from '../something/enum/LatticeType';
import { PassType } from '../something/enum/PassType';
......@@ -627,8 +627,12 @@ export default class MainScene extends Scene {
if (!this.lattices[connectedLat[0]]) {
throw new Error('联通干了个空的@沈豪洲(牛奶) ')
}
this.lattices[connectedLat[0]].down = connectedLat[1];
this.lattices[connectedLat[1]].up = connectedLat[0];
try {
this.lattices[connectedLat[0]].down = connectedLat[1];
this.lattices[connectedLat[1]].up = connectedLat[0];
} catch (error) {
throw new Error('lattices x号位没有东西')
}
var colUp = Tool.indexToRc(connectedLat[0])[1];
var colDown = Tool.indexToRc(connectedLat[1])[1];
......@@ -734,6 +738,24 @@ export default class MainScene extends Scene {
this.elementContainer.addChild(rock);
this.lattices[i].element = rock;
break;
case ElementConfigType.CANDY_RANDOM:
case ElementConfigType.CANDY_1:
case ElementConfigType.CANDY_2:
case ElementConfigType.CANDY_3:
case ElementConfigType.CANDY_4:
case ElementConfigType.CANDY_5:
const candyType = createCandy(elements[i])
let candy: Element = Pool.takeOut(RecoverName.ELEMENT);
if (!candy) {
candy = new Element(candyType)
} else {
candy.reset(candyType)
}
candy.x = p[0];
candy.y = p[1];
this.elementContainer.addChild(candy);
this.lattices[i].element = candy;
break;
//果冻
case ElementConfigType.JELLY:
let jelly: Element = Tool.getElement(ElementType.JELLY)
......
This diff is collapsed.
import { ElementType } from "./ElementType";
/**
* 元素格子配置,需要和地图格子做区分
*/
......@@ -5,51 +7,110 @@ export enum ElementConfigType {
/**
* 空元素格
*/
EMPTY=0,
EMPTY = 0,
/**
* 基础元素
*/
BASE=1,
BASE = 1,
/**
* 石头
*/
ROCK=2,
ROCK = 2,
/**
* 棒棒糖
*/
LOLLIPOP=3,
LOLLIPOP = 3,
/**
* 枷锁
*/
LOCK=4,
LOCK = 4,
/**
* JELLY
*/
JELLY=5,
JELLY = 5,
/**
* CHICKEN_EGG
*/
CHICKEN_EGG=6,
CHICKEN_EGG = 6,
/**
* 气泡
*/
BUBBLE=7,
BUBBLE = 7,
/**
* 灰色毛球
*/
HAIRBALLGREY=8,
HAIRBALLGREY = 8,
/**
* 褐色毛球
*/
HAIRBALLBROWN=9,
HAIRBALLBROWN = 9,
/**
* 黑色毛球
*/
HAIRBALLBLACK=10,
HAIRBALLBLACK = 10,
/**
* 随机糖果
*/
CANDY_RANDOM = 11,
/**
* 糖果1 2 3 4 5号
*/
CANDY_1 = 111,
CANDY_2 = 112,
CANDY_3 = 113,
CANDY_4 = 114,
CANDY_5 = 115,
}
export const isCandy = (t: ElementConfigType) => {
return t == ElementConfigType.CANDY_RANDOM ||
t == ElementConfigType.CANDY_1 ||
t == ElementConfigType.CANDY_2 ||
t == ElementConfigType.CANDY_3 ||
t == ElementConfigType.CANDY_4 ||
t == ElementConfigType.CANDY_5
}
export const createCandy = (t: ElementConfigType) => {
let type: ElementType;
if (t == ElementConfigType.CANDY_RANDOM) {
const order = Math.ceil(Math.random() * 5);
switch (order) {
case 1:
type = ElementType.CANDY1
break;
case 2:
type = ElementType.CANDY2
break;
case 3:
type = ElementType.CANDY3
break;
case 4:
type = ElementType.CANDY4
break;
case 5:
type = ElementType.CANDY5
break;
// /**
// * 石门。石门正面的时候,无法消除。不是锁,锁可以被打破。
// */
// BLOCK_LOCK=11,
default:
break;
}
}
else if (t == ElementConfigType.CANDY_1) {
type = ElementType.CANDY1;
}
else if (t == ElementConfigType.CANDY_2) {
type = ElementType.CANDY2;
}
else if (t == ElementConfigType.CANDY_3) {
type = ElementType.CANDY3;
}
else if (t == ElementConfigType.CANDY_4) {
type = ElementType.CANDY4;
}
else if (t == ElementConfigType.CANDY_5) {
type = ElementType.CANDY5;
};
return type;
}
\ No newline at end of file
......@@ -25,12 +25,26 @@ export enum ElementType {
HAIRBALLGREY,//灰色毛球10
HAIRBALLBROWN,//褐色毛球11
HAIRBALLBLACK,//黑色毛球12
//特殊元素 ,节日元素
FESTIVALELE_BIG, //节日元素大中间一个13
FESTIVALELE_SMALL, //节日元素飞溅的小元素14
CANDY1,
CANDY2,
CANDY3,
CANDY4,
CANDY5,
}
export const isCandyElement=(t:ElementType)=>{
return t == ElementType.CANDY1 ||
t == ElementType.CANDY2 ||
t == ElementType.CANDY3 ||
t == ElementType.CANDY4 ||
t == ElementType.CANDY5
};
/**
* 5种基本元素的数组,每项是ElementType的枚举值
* 判断某类型是否是基础类型用FiveBaseElementTypes.indexOf(baseType) > -1
......
......@@ -1386,6 +1386,132 @@
"levelNum": 275,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 276,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 277,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 278,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 279,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 280,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 281,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 282,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 283,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 284,
"maxScore": 47440,
"stars": 1
}
,
{
"levelNum": 285,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 286,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 287,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 288,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 289,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 290,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 291,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 292,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 293,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 294,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 295,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 296,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 297,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 298,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 299,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 300,
"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