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; ...@@ -69,16 +69,16 @@ const baseScore = 20;
* 炸弹+炸弹(L+L) 4.0倍 * 炸弹+炸弹(L+L) 4.0倍
* 魔力鸟+魔力鸟(5+5) 5.0倍 * 魔力鸟+魔力鸟(5+5) 5.0倍
*/ */
const effectBaseTimes = [ const effectBaseTimes = {
1.5, 0: 1.5,
1.5, 1: 1.5,
2, 2: 2,
2.5, 3: 2.5,
3, 4: 3,
3.5, 5: 3.5,
4, 6: 4,
5 7: 5
] }
...@@ -661,7 +661,6 @@ export default class MainScene extends Scene { ...@@ -661,7 +661,6 @@ export default class MainScene extends Scene {
// }, PropType.CHANCE_NUM) // }, PropType.CHANCE_NUM)
} }
} }
//使用道具逻辑 //使用道具逻辑
useProp(prop: PropType) { useProp(prop: PropType) {
//去掉移动提示侦听 //去掉移动提示侦听
...@@ -685,9 +684,12 @@ export default class MainScene extends Scene { ...@@ -685,9 +684,12 @@ export default class MainScene extends Scene {
} }
let fun: Function; let fun: Function;
this.elementContainer.addEventListener(egret.TouchEvent.TOUCH_BEGIN, fun = function (e) { 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); this.elementContainer.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, fun, this);
var index = e.target.parent.index; var index = ele.index;
this.sendPropUse(prop, index); this.sendPropUse(prop, index);
} }
}, this) }, this)
...@@ -730,6 +732,7 @@ export default class MainScene extends Scene { ...@@ -730,6 +732,7 @@ export default class MainScene extends Scene {
for (var i = 0; i < this.lattices.length; i++) { for (var i = 0; i < this.lattices.length; i++) {
var lat = this.lattices[i]; var lat = this.lattices[i];
if (Tool.judgeEliminate(lat) && (lat.row == rc[0] || lat.column == rc[1])) { if (Tool.judgeEliminate(lat) && (lat.row == rc[0] || lat.column == rc[1])) {
if (this.eliminatedElements.indexOf(i) == -1) {
this.eliminatedElements.push(i); this.eliminatedElements.push(i);
if (!lat.element.isLock) { if (!lat.element.isLock) {
//3倍 //3倍
...@@ -737,12 +740,17 @@ export default class MainScene extends Scene { ...@@ -737,12 +740,17 @@ export default class MainScene extends Scene {
} }
} }
} }
setTimeout(()=>{ }
setTimeout(() => {
this.eliminate(); this.eliminate();
},200) }, 200)
break; break;
case PropType.HAMMER: case PropType.HAMMER:
this.eliminatedElements.push(index); this.eliminatedElements.push(index);
this.pushScoreAni(
baseScore * 1 * (effectBaseTimes[this.lattices[index].element.effectType] || 1),
Tool.getPositionByIndex(index)
)
this.eliminate(); this.eliminate();
break; break;
case PropType.CHANCE_NUM: case PropType.CHANCE_NUM:
...@@ -1947,11 +1955,15 @@ export default class MainScene extends Scene { ...@@ -1947,11 +1955,15 @@ export default class MainScene extends Scene {
bonusShootAni.play(r * 180 / Math.PI, [ele.x, ele.y], () => { bonusShootAni.play(r * 180 / Math.PI, [ele.x, ele.y], () => {
ele.effectType = Math.random() > 0.5 ? EffectType.HORIZONTAL : EffectType.VERTICAL; ele.effectType = Math.random() > 0.5 ? EffectType.HORIZONTAL : EffectType.VERTICAL;
count++; count++;
this.eliminatedElements.push(ele.index) this.eliminatedElements.push(ele.index);
this.pushScoreAni(baseScore * 1 * 1.5, [ele.x, ele.y])
if (count == countAll) { if (count == countAll) {
this.eliminate(); this.eliminate();
//如果还有步数就置0 //如果还有步数就置0
if (this.steps) this.steps = 0; if (this.steps) {
this.score += 500 * this.steps;
this.steps = 0;
}
} }
}) })
}, 150 * deltaCount) }, 150 * deltaCount)
...@@ -1981,15 +1993,15 @@ export default class MainScene extends Scene { ...@@ -1981,15 +1993,15 @@ export default class MainScene extends Scene {
var sv: string; var sv: string;
if (this.oneStepScore > 5000) { if (this.oneStepScore > 5000) {
playSound(SoundType.toast); playSound(SoundType.toast);
sv = "wonderful" sv = "wonderful";
} }
else if (this.oneStepScore > 3000) { else if (this.oneStepScore > 3000) {
playSound(SoundType.toast); playSound(SoundType.toast);
sv = "great" sv = "amazing";
} }
else if (this.oneStepScore > 1000) { else if (this.oneStepScore > 1000) {
playSound(SoundType.toast); playSound(SoundType.toast);
sv = "amazing" sv = "great";
} }
if (sv && this.movieClips[sv]) { if (sv && this.movieClips[sv]) {
this.addChild(this.movieClips[sv]) this.addChild(this.movieClips[sv])
......
...@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [ ...@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [
{ {
map: { map: {
lattices: [ 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, 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,
1, 1, 1, 1, 1, 1, 1, 1, 1, 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,
], ],
generateLats: [0, 1, 2, 3, 4, 5, 6, 7, 8], generateLats: [18, 19, 20, 21, 22, 23, 24, 25, 26],
paths: [ 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"], 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[] = [ ...@@ -597,5 +597,34 @@ export const Chapters: ChapterData[] = [
starScores: [11000, 22000, 45000] 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