Commit 16c4acbb authored by zjz1994's avatar zjz1994

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into 猩猩

parents 37e9d57a 06e4d8b1
{"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
......@@ -331,6 +331,9 @@ export default class SignPanel extends Panel {
super.removeEvents();
this["closeBtn"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
this["btn1"].removeEventListener(egret.TouchEvent.TOUCH_TAP, this.signToday, this);
this.rmMvListener();
}
movep1:egret.Point;
......@@ -653,10 +656,10 @@ export default class SignPanel extends Panel {
if(!svgaParser) svgaParser = new window["SVGA"].Parser();
var svgas = ["signgiftbox", "signsandot", "signshine", "signxistar"];
for (let i = 0; i < svgas.length; i++) {
// if (movieClips[svgas[i]]){
// // this.addMvListener(svgas[i]);
// continue;
// }
if (movieClips[svgas[i]]){
this.addMvListener(svgas[i]);
continue;
}
let mvname = svgas[i];
svgaParser.load(resPath + 'resource/assets/svgas/' + svgas[i] + ".svga", (videoItem) => {
var mv = new window["SVGA"].EgretMovieClip(videoItem);
......@@ -694,9 +697,18 @@ export default class SignPanel extends Panel {
})
}
}
completeCall:{signxistar:Function,signshine:Function,signsandot:Function,signgiftbox:Function} = {
signxistar:null,signshine:null,signsandot:null,signgiftbox:null
};
enterFrameCall:{signxistar:Function,signshine:Function,signsandot:Function,signgiftbox:Function} = {
signxistar:null,signshine:null,signsandot:null,signgiftbox:null
};
addMvListener(mvname){
let fun;
movieClips[mvname].addEventListener(egret.Event.COMPLETE, fun = function(e) {
if(this.completeCall[mvname]){
this.completeCall[mvname] = null;
}
this.completeCall[mvname] = function(e) {
if(mvname=="signxistar"){
if(this.autoClose){
e.target.stop()
......@@ -718,10 +730,13 @@ export default class SignPanel extends Panel {
// movieClips['signxistar'].alpha = 1;
// movieClips['signxistar'].gotoAndPlay(1,1);
// }
}, this)
}.bind(this);
movieClips[mvname].addEventListener(egret.Event.COMPLETE, this.completeCall[mvname], this)
if(mvname=="signshine"){
let fun1;
movieClips['signshine'].addEventListener(egret.Event.ENTER_FRAME,fun1 = function(e){
if(this.enterFrameCall[mvname]){
this.enterFrameCall[mvname] = null;
}
this.enterFrameCall[mvname] = function(e){
var curframe = movieClips['signshine'].currentFrame;
if(curframe==20){
egret.Tween.get(movieClips['signxistar'])
......@@ -735,10 +750,14 @@ export default class SignPanel extends Panel {
movieClips['signxistar'].gotoAndPlay(1,1);
},this);
}
},this);
}.bind(this);
movieClips['signshine'].addEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname] ,this);
}else if(mvname=="signgiftbox"){
let fun2;
movieClips['signgiftbox'].addEventListener(egret.Event.ENTER_FRAME,fun2 = function(e){
if(this.enterFrameCall[mvname]){
this.enterFrameCall[mvname] = null;
}
this.enterFrameCall[mvname] = function(e){
var curframe = movieClips['signgiftbox'].currentFrame;
if(curframe==5){
// egret.Tween.get(movieClips['signxistar'])
......@@ -760,10 +779,10 @@ export default class SignPanel extends Panel {
this.playShineDot();
this.tweenShowGroup();
}
},this);
}.bind(this);
movieClips['signgiftbox']
movieClips['signgiftbox'].addEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname],this);
}
// if(mvname=="signxistar"){//开始收
// let fun1;
......@@ -780,4 +799,23 @@ export default class SignPanel extends Panel {
// },this)
// }
}
rmMvListener(){
var svgas = ["signgiftbox", "signsandot", "signshine", "signxistar"];
for (let i = 0; i < svgas.length; i++) {
let mvname = svgas[i];
if(movieClips[mvname]&&this.completeCall[mvname]){
movieClips[mvname].removeEventListener(egret.Event.COMPLETE,this.completeCall[mvname], this);
}
if(mvname=="signshine"){
if(movieClips[mvname]&&this.enterFrameCall[mvname]){
movieClips['signshine'].removeEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname] ,this);
}
}else if(mvname=="signgiftbox"){
if(movieClips[mvname]&&this.enterFrameCall[mvname]){
movieClips['signgiftbox'].removeEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname] ,this);
}
}
}
}
}
\ 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;
}
......
......@@ -40,7 +40,7 @@ export class ScoreProgress {
return
}
}
w = (640 - 563) * scale + 563 - 138;
w = (640 - 583) * scale + 583 - 138;
if(this.star3.source != "lightedStar_png") {
this.star3.source = "lightedStar_png";
this.star2.source = "lightedStar_png";
......@@ -51,7 +51,7 @@ export class ScoreProgress {
//是否超过2星
else if(value >= this.starScores[1]) {
scale = (value - this.starScores[1]) / (this.starScores[2] - this.starScores[1]);
w = (563 - 476) * scale + 476 - 138;
w = (583 - 496) * scale + 496 - 138;
if(this.star2.source != "lightedStar_png") {
this.star2.source = "lightedStar_png";
this.star1.source = "lightedStar_png";
......@@ -61,14 +61,14 @@ export class ScoreProgress {
//是否超过1星
else if(value >= this.starScores[0]) {
scale = (value - this.starScores[0]) / (this.starScores[1] - this.starScores[0]);
w = (476 - 390) * scale + 390 - 138;
w = (496 - 410) * scale + 410 - 138;
if(this.star1.source != "lightedStar_png") {
this.star1.source = "lightedStar_png";
this.starCount = 1;
}
} else {
scale = value / this.starScores[0];
w = (390 - 138) * scale;
w = (410 - 138) * scale;
}
//(466-428)/428,扩分数
//星星
......@@ -110,15 +110,15 @@ export class ScoreProgress {
//星星1 lightedStar_png
var textureStar = RES.getRes("unlightedStar_png");
this.star1 = new eui.Image(textureStar); // width (27 * 2)
this.star1.x = 363; // 390
this.star1.x = 383; // 410
this.star1.y = 201;
p.addChild(this.star1);
this.star2 = new eui.Image(textureStar);
this.star2.x = 449; // 476
this.star2.x = 469; // 496
this.star2.y = 201;
p.addChild(this.star2);
this.star3 = new eui.Image(textureStar);
this.star3.x = 536; // 563
this.star3.x = 556; // 583
this.star3.y = 201;
p.addChild(this.star3);
}
......
{
"success": true,
"signInfoVO": {
"continueDay": 4,
"continueDay": 5,
"todaySigned": 0
}
}
\ 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