Commit b2527834 authored by wildfirecode's avatar wildfirecode

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

parents 9dfaac5d 60f42201
......@@ -69,16 +69,16 @@ const baseScore = 20;
* 炸弹+炸弹(L+L) 4.0倍
* 魔力鸟+魔力鸟(5+5) 5.0倍
*/
const effectBaseTimes = [
1.5,
1.5,
2,
2.5,
3,
3.5,
4,
5
]
const effectBaseTimes = {
0: 1.5,
1: 1.5,
2: 2,
3: 2.5,
4: 3,
5: 3.5,
6: 4,
7: 5
}
......@@ -661,7 +661,6 @@ export default class MainScene extends Scene {
// }, PropType.CHANCE_NUM)
}
}
//使用道具逻辑
useProp(prop: PropType) {
//去掉移动提示侦听
......@@ -685,9 +684,12 @@ export default class MainScene extends Scene {
}
let fun: Function;
this.elementContainer.addEventListener(egret.TouchEvent.TOUCH_BEGIN, fun = function (e) {
if (e.target.parent instanceof Element && e.target.parent.type != ElementType.ROCK) {
var ele = e.target.parent
if (ele instanceof Element &&
ele.type != ElementType.ROCK &&
ele.type != ElementType.LOLLIPOP) {
this.elementContainer.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, fun, this);
var index = e.target.parent.index;
var index = ele.index;
this.sendPropUse(prop, index);
}
}, this)
......@@ -730,19 +732,25 @@ export default class MainScene extends Scene {
for (var i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i];
if (Tool.judgeEliminate(lat) && (lat.row == rc[0] || lat.column == rc[1])) {
this.eliminatedElements.push(i);
if (!lat.element.isLock) {
//3倍
this.pushScoreAni(baseScore * 1 * 3, Tool.getPositionByIndex(i))
if (this.eliminatedElements.indexOf(i) == -1) {
this.eliminatedElements.push(i);
if (!lat.element.isLock) {
//3倍
this.pushScoreAni(baseScore * 1 * 3, Tool.getPositionByIndex(i))
}
}
}
}
setTimeout(()=>{
setTimeout(() => {
this.eliminate();
},200)
}, 200)
break;
case PropType.HAMMER:
this.eliminatedElements.push(index);
this.pushScoreAni(
baseScore * 1 * (effectBaseTimes[this.lattices[index].element.effectType] || 1),
Tool.getPositionByIndex(index)
)
this.eliminate();
break;
case PropType.CHANCE_NUM:
......@@ -1947,11 +1955,15 @@ export default class MainScene extends Scene {
bonusShootAni.play(r * 180 / Math.PI, [ele.x, ele.y], () => {
ele.effectType = Math.random() > 0.5 ? EffectType.HORIZONTAL : EffectType.VERTICAL;
count++;
this.eliminatedElements.push(ele.index)
this.eliminatedElements.push(ele.index);
this.pushScoreAni(baseScore * 1 * 1.5, [ele.x, ele.y])
if (count == countAll) {
this.eliminate();
//如果还有步数就置0
if (this.steps) this.steps = 0;
if (this.steps) {
this.score += 500 * this.steps;
this.steps = 0;
}
}
})
}, 150 * deltaCount)
......@@ -1981,15 +1993,15 @@ export default class MainScene extends Scene {
var sv: string;
if (this.oneStepScore > 5000) {
playSound(SoundType.toast);
sv = "wonderful"
sv = "wonderful";
}
else if (this.oneStepScore > 3000) {
playSound(SoundType.toast);
sv = "great"
sv = "amazing";
}
else if (this.oneStepScore > 1000) {
playSound(SoundType.toast);
sv = "amazing"
sv = "great";
}
if (sv && this.movieClips[sv]) {
this.addChild(this.movieClips[sv])
......
......@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [
{
map: {
lattices: [
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
],
generateLats: [0, 1, 2, 3, 4, 5, 6, 7, 8],
generateLats: [18, 19, 20, 21, 22, 23, 24, 25, 26],
paths: [
{
indexs: ["0_l_u", "8_r_u", "80_r_d", "72_l_d", "63_l_u", "63_r_u", "54_r_u", "54_l_u"],
......@@ -597,5 +597,34 @@ export const Chapters: ChapterData[] = [
starScores: [11000, 22000, 45000]
},
//////////////////////
//第二十一关
{
map: {
lattices: [
0, 0, 0, 1, 4, 1, 0, 0, 0,
1, 2, 5, 1, 1, 1, 5, 2, 1,
1, 2, 5, 1, 1, 1, 5, 2, 1,
1, 5, 5, 1, 1, 1, 5, 5, 1,
1, 1, 2, 1, 1, 1, 2, 1, 1,
2, 2, 2, 1, 1, 1, 2, 2, 2,
2, 5, 5, 2, 2, 2, 5, 5, 2,
5, 5, 5, 5, 5, 5, 5, 5, 5,
1, 1, 1, 1, 1, 0, 2, 5, 2,
],
generateLats: [3, 4, 5],
},
baseElementTypes: [0, 1, 2, 3, 4],
effectInitProbability: 0.05,
stepCount: 46,
passTarget: {
type: PassType.ELEMENT_TARGET,
elements: [
{
type: ElementType.ICE,
count: 22
}
]
},
starScores: [11000, 22000, 45000]
},
]
\ No newline at end of file
export class BonusTime extends egret.Bitmap{
constructor(value?:egret.Texture){
super();
new egret.Bitmap()
}
}
\ No newline at end of file
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