Commit b6fcd9a7 authored by wildfirecode's avatar wildfirecode

1

parent 0f73eef7
...@@ -300,14 +300,27 @@ export default class MapScene extends Scene { ...@@ -300,14 +300,27 @@ export default class MapScene extends Scene {
this['boxLayer'].visible = true; this['boxLayer'].visible = true;
this._mc = await loadSvga(getResPath() + 'resource/assets/svgas/box.svga', this['boxani']); this._mc = await loadSvga(getResPath() + 'resource/assets/svgas/box.svga', this['boxani']);
this._mc.stop(); this._mc.stop();
this._mc.anchorOffsetX = 750/2;
this._mc.anchorOffsetY = 500+50+30;
this._mc.x=750/2;
this._mc.y=500+50+30;
this._mc.visible=false; this._mc.visible=false;
await wait(50); await wait(50);
this._mc.visible=true; this._mc.visible=true;
const a = 100,b = 10;
egret.Tween.get(this._mc,{loop:true}).set({rotation:b})
.to({rotation:-b},a).to({rotation:b},a)
.to({rotation:-b},a).to({rotation:b},a)
.to({rotation:-b},a).to({rotation:b},a)
.to({rotation:0},a/2)
.wait(1000);
} }
} }
async playAni() { async playAni() {
if (this._mc) { if (this._mc) {
egret.Tween.removeTweens(this._mc);
this._mc.gotoAndPlay(1, true); this._mc.gotoAndPlay(1, true);
await this.onPlaySTOP(); await this.onPlaySTOP();
} }
......
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