Commit c47af0df authored by wjf's avatar wjf

l

parent 3308ed7d
{
"code": "000000",
"data": {
"currentLevel": 9,
"isFristLogin": false,
"visitors": [
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 25230,
"level": 8,
"createTime": 1595384151916,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595384151916,
"_id": "5f17a157114fbb904c2960a9",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 48400,
"level": 7,
"createTime": 1595384121437,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595384121437,
"_id": "5f17a1393075d9927ecaa167",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 29190,
"level": 6,
"createTime": 1595383992964,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595383992964,
"_id": "5f17a0b8964f9796f92905af",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 35340,
"level": 5,
"createTime": 1595383923721,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595383923721,
"_id": "5f17a07385a749991449cc5e",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 15190,
"level": 4,
"createTime": 1595314767660,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595314767660,
"_id": "5f16924f086e65659ba635f0",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 13980,
"level": 3,
"createTime": 1595310071216,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595310071216,
"_id": "5f167ff7086e65659ba61824",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 960,
"level": 2,
"createTime": 1595309984235,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595309984235,
"_id": "5f167fa0c3ad3494b93d47e3",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f11948b3075d9927ec1f4ce",
"score": 64690,
"level": 1,
"createTime": 1595309828984,
"openId": "AAE7CvE-ALiIWXYsJuQ4PxLI",
"isVisitSuccess": true,
"updateTime": 1595309828984,
"_id": "5f167f059897b48d280c5880",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
}
],
"prizes": [],
"loginAddPower": 0,
"power": 987,
"tools": {
"HAMMERS": 2,
"STEPS": 2,
"BOOMS": 1
},
"topAward": {}
},
"success": true,
"message": "成功"
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
"data": {
"power": 100,
"loginAddPower": true,
"currentLevel": 25,
"currentLevel": 120,
"tools": {
"STEPS": 1,
"BOOMS": 2,
......
This diff is collapsed.
This diff is collapsed.
......@@ -62,10 +62,6 @@ export class Lottie extends FYGE.Container {
* 按帧率计算,60为1,30为2,
*/
private deltaFrame: number = 1;
/**
* 所有带动效的对象
*/
private tweenDatas: TweenData[];
get videoWidth(): number {
return this.rawData && this.rawData.w;
......@@ -268,8 +264,7 @@ export class Lottie extends FYGE.Container {
var rr = xs.replace(/[^0-9]/ig, "");
var num = Math.round((this.rawData.op - data[data.length - 1 - rr].t) / (data[data.length - 1].t - data[data.length - 1 - rr].t));
//objArr只有一部分是进行循环的。
objArr = objArr.slice(-(xs.replace(/[^0-9]/ig, "")))
if (dis["layerData"].nm == "bonus_light_11.png") { console.log(dis.alpha) }
objArr = objArr.slice(-rr)
while (--num) {
//补满
for (var o = 0; o < objArr.length; o++) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -312,7 +312,7 @@ export class PlayScene extends Scene {
this.upsetElement();
} else {
this.enableMouseEvt(true);
//首次送道具,的动画先出,然后再出引导 TODO
//首次送道具,的动画先出,然后再出引导
if (this.chapter == 1 && Tools.gameData.isFristLogin) {
this.addChild(new FirstPropGift())
.once(FYGE.MouseEvent.CLICK, (e: FYGE.MouseEvent) => {
......@@ -2266,6 +2266,10 @@ export class PlayScene extends Scene {
*/
effectEliminate(effectIndexs: number[]) {
if (effectIndexs.length && !this.hasPassed) this.effectContinuityTimes++;
//判断是否在原先消除队列里或effectIndexs里
let judgeExclude = (i: number) => {
return this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0
}
// var sounds: SoundType[] = [];
for (var j = 0; j < effectIndexs.length; j++) {
var index = effectIndexs[j];
......@@ -2294,9 +2298,9 @@ export class PlayScene extends Scene {
//对于魔力鸟的效果有不一样的,旋转,该组元素要旋转消除
for (var i = 0; i < this.lattices.length; i++) {
if (Tool.judgeMagicEliminate(this.lattices[i]) &&
this.lattices[i].element.type == type //类型相等
this.lattices[i].element.type == type && //类型相等
judgeExclude(i)
) {
if (this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0) {
this.eliminatedElements.push(i);
//无特效未枷锁,无毛球的参与旋转
if (Tool.judgeMagicRotate(this.lattices[i].element)) {
......@@ -2308,7 +2312,6 @@ export class PlayScene extends Scene {
}
}
}
}
break;
case EffectType.EXPLOSIVE:
// if (sounds.indexOf(SoundType.boom) == -1) sounds.push(SoundType.boom)
......@@ -2317,18 +2320,27 @@ export class PlayScene extends Scene {
boomAni.scaleX = boomAni.scaleY = 1;
this.recoverEle(index);
//3*3,需要优化
for (var i = 0; i < this.lattices.length; i++) {
if (Tool.judgeEliminate(this.lattices[i]) &&
(Math.abs(this.lattices[i].row - lat.row) < 2 && Math.abs(this.lattices[i].column - lat.column) < 2)) {
if (this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0) {
// for (var i = 0; i < this.lattices.length; i++) {
// if (Tool.judgeEliminate(this.lattices[i]) &&
// (Math.abs(this.lattices[i].row - lat.row) < 2 && Math.abs(this.lattices[i].column - lat.column) < 2)) {
// if (this.eliminatedElements.indexOf(i) < 0 && effectIndexs.indexOf(i) < 0) {
// this.eliminatedElements.push(i);
// //加分
// if (Tool.judgeHasScore(this.lattices[i].element)) {
// this.pushScoreAni(baseScore * this.effectContinuityTimes * effectBaseTimes["2"], Tool.getPositionByIndex(i))
// }
// }
// }
// }
Tool.getExplosiveIndexes(lat, this.lattices).forEach((i) => {
if (judgeExclude(i)) {
this.eliminatedElements.push(i);
//加分
if (Tool.judgeHasScore(this.lattices[i].element)) {
this.pushScoreAni(baseScore * this.effectContinuityTimes * effectBaseTimes["2"], Tool.getPositionByIndex(i))
}
}
}
}
})
break;
case EffectType.HORIZONTAL:
// if (sounds.indexOf(SoundType.line) == -1) sounds.push(SoundType.line)
......@@ -2338,8 +2350,9 @@ export class PlayScene extends Scene {
this.recoverEle(index);
for (var i = 0; i < Tool.colNum; i++) {
var ein = Tool.rcToIndex(row, i);
if (Tool.judgeEliminate(this.lattices[ein])) {
if (this.eliminatedElements.indexOf(ein) < 0 && effectIndexs.indexOf(ein) < 0) {
if (Tool.judgeEliminate(this.lattices[ein]) &&
judgeExclude(ein)
) {
this.eliminatedElements.push(ein);
//加分
if (Tool.judgeHasScore(this.lattices[ein].element)) {
......@@ -2347,7 +2360,6 @@ export class PlayScene extends Scene {
}
}
}
}
break;
case EffectType.VERTICAL:
// if (sounds.indexOf(SoundType.line) == -1) sounds.push(SoundType.line)
......@@ -2357,8 +2369,9 @@ export class PlayScene extends Scene {
this.recoverEle(index);
for (var i = 0; i < Tool.rowNum; i++) {
var ein = Tool.rcToIndex(i, col);
if (Tool.judgeEliminate(this.lattices[ein])) {
if (this.eliminatedElements.indexOf(ein) < 0 && effectIndexs.indexOf(ein) < 0) {
if (Tool.judgeEliminate(this.lattices[ein]) &&
judgeExclude(ein)
) {
this.eliminatedElements.push(ein);
//加分
if (Tool.judgeHasScore(this.lattices[ein].element)) {
......@@ -2366,7 +2379,6 @@ export class PlayScene extends Scene {
}
}
}
}
break;
}
}
......@@ -2632,7 +2644,7 @@ export class PlayScene extends Scene {
*/
openRedBombPanel() {
if (this.redBombPanelMark) {
// PanelCtrl.instance.show(redBombPanelName);TODO
// PanelCtrl.instance.show(redBombPanelName);
this.redBombPanelMark = false;
}
}
......
......@@ -23,7 +23,7 @@ function initClientScale() {
document.body.clientHeight / document.body.clientWidth * 750;
var middleHeight = 80 * 9;
var topHeight = 238;
var botHeight = 140+20//210 //+10
var botHeight = 140 + 20//210 //+10
var smallestHeight = topHeight + middleHeight + botHeight;
if (stageHeight < smallestHeight) {
offsetYTwo[0] = topHeight;
......@@ -515,7 +515,29 @@ export class Tool {
}
return true
}
/**
* 爆炸波及的格子索引
*/
private static ExplosiveMatchArr = [
[0, -2],
[-1, -1], [0, -1], [1, -1],
[-2, 0], [-1, 0], [1, 0], [2, 0],
[-1, 1], [0, 1], [1, 1],
[0, 2],
]
/**
* 获取爆炸时的周边索引
*/
public static getExplosiveIndexes(curLat: Lattice, lats: Lattice[]): number[] {
var arr = []
Tool.ExplosiveMatchArr.forEach((e) => {
var col = curLat.column + e[0]
var row = curLat.row + e[1]
var index = Tool.rcToIndex(row, col);
if (Tool.judgeEliminate(lats[index])) arr.push(index)
})
return arr
}
/**
* 检测死图,需要提示
* 需要返回一组提示 两个能互相交换元素,数组
......
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