Commit 51f8a615 authored by wildfirecode's avatar wildfirecode

1

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