Commit 7bfd0ae3 authored by 邱旭's avatar 邱旭

1

parent e37398df
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["../assets/common/turnnoprize再来一次.png","../assets/common/toast.png","../assets/common/share_btn2.png","../assets/common/share_btn1.png","../assets/common/prizePanelbg.png","../assets/common/lightani.png","../assets/common/exchangebtn.png","../assets/common/common_yuanbao.png","../assets/common/common_prop3.png","../assets/common/common_prop2.png","../assets/common/common_prop1.png","../assets/common/common_prizelight.png","../assets/common/common_money.png","../assets/common/common_blood.png","../assets/common/common_adbg.png","../assets/common/commmon_okbtn1.png","../assets/common/closeCommonBtn.png","../assets/common/btn.png","../assets/common/alertbg.png","../assets/common/按钮 副本 4.png","../assets/common/按钮 副本 3.png","../assets/common/common_block.png","../assets/common/common_block_front.png","../assets/common/common_block_bg_yellow.png","../assets/common/common_block_bg_red.png","../assets/common/common_block_bg_blue.png","../assets/common/chocolate3.png","../assets/common/chocolate1.png","../assets/common/chocolate0.png","../assets/common/chocolate2.png","../assets/common/turnprize_icon3.png","../assets/common/turnprize_icon2.png","../assets/common/turnprize_icon1.png","../assets/common/commom_prop_bg.png","../assets/common/arrowbg.png","../assets/common/common_closebtn2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["../assets/common/turnnoprize再来一次.png","../assets/common/toast.png","../assets/common/share_btn2.png","../assets/common/share_btn1.png","../assets/common/prizePanelbg.png","../assets/common/lightani.png","../assets/common/exchangebtn.png","../assets/common/common_yuanbao.png","../assets/common/common_prop3.png","../assets/common/common_prop2.png","../assets/common/common_prop1.png","../assets/common/common_prizelight.png","../assets/common/common_money.png","../assets/common/common_blood.png","../assets/common/common_adbg.png","../assets/common/commmon_okbtn1.png","../assets/common/closeCommonBtn.png","../assets/common/btn.png","../assets/common/alertbg.png","../assets/common/按钮 副本 4.png","../assets/common/按钮 副本 3.png","../assets/common/common_block.png","../assets/common/common_block_front.png","../assets/common/common_block_bg_yellow.png","../assets/common/common_block_bg_red.png","../assets/common/common_block_bg_blue.png","../assets/common/chocolate3.png","../assets/common/chocolate1.png","../assets/common/chocolate0.png","../assets/common/chocolate2.png","../assets/common/turnprize_icon3.png","../assets/common/turnprize_icon2.png","../assets/common/turnprize_icon1.png","../assets/common/commom_prop_bg.png","../assets/common/arrowbg.png","../assets/common/common_closebtn2.png","../assets/common/commom_share1.png","../assets/common/turnnoprize继续闯关.png","../assets/common/commom_prop_bg.png","../assets/common/combglight.png"]}
\ No newline at end of file
......@@ -4,29 +4,32 @@ import { RecoverName } from "../enum/RecoverName";
import { playSound, SoundType } from "../../soundCtrl";
export const stepPosition: number[] = [125, 115];
export const stepPosition: number[] = [175, 165];
/**
* 需要回调的
* 手动修改this.shoot.rotation=
*/
export class BonusShootAni extends egret.DisplayObjectContainer {
shoot: egret.Bitmap;
imageAni: ImageAni
imageAni: ImageAni;
constructor() {
super()
var texture = RES.getRes("bonusShoot_png")
super();
var texture = RES.getRes("bonusShoot_png");
this.shoot = new egret.Bitmap(texture);
this.shoot.anchorOffsetX = 78;
this.shoot.anchorOffsetY = 37 / 2;
this.addChild(this.shoot);
var arr = []
for (var i = 1; i <= 27; i++) {
var arr = [];
for(var i = 1; i <= 27; i++) {
arr.push("bonusFra" + i + "_png");
}
this.imageAni = new ImageAni(arr);
this.addChild(this.imageAni);
this.imageAni.visible = false
}
reset() {
this.shoot.visible = true;
this.imageAni.visible = false;
......@@ -35,19 +38,19 @@ export class BonusShootAni extends egret.DisplayObjectContainer {
}
play(rotation: number, p: number[], callback: Function) {
this.reset()
this.reset();
this.shoot.rotation = rotation;
egret.Tween.get(this)
.to({ x: p[0], y: p[1] }, 300)
.to({x: p[0], y: p[1]}, 300)
.call(() => {
callback();
playSound(SoundType.bonusShoot)
playSound(SoundType.bonusShoot);
this.shoot.visible = false;
this.imageAni.visible = true;
this.imageAni.play(() => {
if (this.$parent) {
if(this.$parent) {
this.$parent.removeChild(this)
};
}
Pool.recover(RecoverName.BONUSSHOOT_ANI, this)
// callback();
})
......
......@@ -3,7 +3,7 @@
export class BonusTime extends egret.Bitmap {
constructor() {
super();
this.texture = RES.getRes("bonusTime_png")
this.texture = RES.getRes("bonusTime_png");
this.anchorOffsetX = this.texture.textureWidth / 2;
this.anchorOffsetY = this.texture.textureHeight / 2;
}
......
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