Commit 51f8a615 authored by wildfirecode's avatar wildfirecode

1

parent 7436da46
...@@ -274,6 +274,7 @@ export class Tool { ...@@ -274,6 +274,7 @@ export class Tool {
lat.element.hasState(StateType.LOCK) || lat.element.hasState(StateType.LOCK) ||
lat.element.hasState(StateType.BLOCK_LOCK) || lat.element.hasState(StateType.BLOCK_LOCK) ||
lat.element.type == ElementType.JELLY || lat.element.type == ElementType.JELLY ||
lat.element.type == ElementType.JELLY_MONSTER ||
lat.element.type == ElementType.CHICKEN_EGG || lat.element.type == ElementType.CHICKEN_EGG ||
lat.element.type == ElementType.FESTIVALELE_BIG //|| lat.element.type == ElementType.FESTIVALELE_BIG //||
// lat.element.type == ElementType.FESTIVALELE_SMALL // lat.element.type == ElementType.FESTIVALELE_SMALL
...@@ -297,6 +298,7 @@ export class Tool { ...@@ -297,6 +298,7 @@ export class Tool {
!lat.element.hasState(StateType.HAIRBALLGREY) && !lat.element.hasState(StateType.HAIRBALLGREY) &&
!lat.element.hasState(StateType.HAIRBALLBROWN) && !lat.element.hasState(StateType.HAIRBALLBROWN) &&
!lat.element.hasState(StateType.BLOCK_LOCK) && !lat.element.hasState(StateType.BLOCK_LOCK) &&
lat.element.type != ElementType.JELLY_MONSTER,
lat.element.type != ElementType.FESTIVALELE_SMALL lat.element.type != ElementType.FESTIVALELE_SMALL
) { ) {
return true return true
...@@ -411,6 +413,7 @@ export class Tool { ...@@ -411,6 +413,7 @@ export class Tool {
ele.hasState(StateType.HAIRBALLBLACK) || ele.hasState(StateType.HAIRBALLBLACK) ||
ele.hasState(StateType.HAIRBALLBROWN) || ele.hasState(StateType.HAIRBALLBROWN) ||
ele.type == ElementType.JELLY || ele.type == ElementType.JELLY ||
ele.type == ElementType.JELLY_MONSTER ||
ele.type == ElementType.CHICKEN_EGG || ele.type == ElementType.CHICKEN_EGG ||
ele.type == ElementType.FESTIVALELE_BIG || ele.type == ElementType.FESTIVALELE_BIG ||
ele.type == ElementType.FESTIVALELE_SMALL ele.type == ElementType.FESTIVALELE_SMALL
......
...@@ -60,10 +60,10 @@ export class Element extends eui.Component { ...@@ -60,10 +60,10 @@ export class Element extends eui.Component {
// egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300); // egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300);
// } // }
// }, this); // }, this);
setInterval(()=>{ setInterval(() => {
this.toAction(); this.toAction();
},5000); }, 5000);
} }
toStandByAction() { toStandByAction() {
...@@ -87,16 +87,17 @@ export class Element extends eui.Component { ...@@ -87,16 +87,17 @@ export class Element extends eui.Component {
this.toStandByAction(); this.toStandByAction();
} }
if (mv.currentFrame == 391) { if (mv.currentFrame == 391) {
const tex: egret.Texture = RES.getRes("ele20_png"); this.dispatchEvent(new egret.Event('onBlow'));
const pic = new egret.Bitmap(tex); // const tex: egret.Texture = RES.getRes("ele20_png");
pic.anchorOffsetX = tex.textureWidth / 2; // const pic = new egret.Bitmap(tex);
pic.anchorOffsetY = tex.textureHeight; // pic.anchorOffsetX = tex.textureWidth / 2;
pic.x = p[0]; // pic.anchorOffsetY = tex.textureHeight;
pic.y = p[1]; // pic.x = p[0];
this.stage.addChild(pic); // pic.y = p[1];
egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1.1, scaleY: 1.1 }, 300).wait(1000).call(()=>{ // this.stage.addChild(pic);
pic.parent.removeChild(pic); // egret.Tween.get(pic).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1.1, scaleY: 1.1 }, 300).wait(1000).call(()=>{
}); // pic.parent.removeChild(pic);
// });
} }
}; };
this._mv.addEventListener(egret.Event.ENTER_FRAME, cb, this); this._mv.addEventListener(egret.Event.ENTER_FRAME, cb, this);
......
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