Commit 60657823 authored by zjz1994's avatar zjz1994

调整签到特效

parent 59a842c5
......@@ -73,7 +73,7 @@
"name": "exchange"
},
{
"keys": "signitem_png,signicon6_png,signicon5_png,signicon4_png,signicon3_png,signicon2_png,signicon_blood_png,signbtn4_png,signbtn3_png,signbtn2_png,signbtn1_png,signbg_png,sign_quan88_png,sign_quan8_png,sign_quan58_png,sign_quan38_png,sign_quan28_png,sign_quan16_png,sign_quan15_png,sign_quan12_png,sign_line2_png,sign_line_png,sign_light_png,sign_icon1_png,sign_quan10_png,sign_quan23_png,sign_quan36_png,sign_quan25_png,sign_quan35_png,sign_quan30_png,sign_mask_png,signitemno_png,signitemyes_png,unsignbtn_png,virprizebg_png",
"keys": "signitem_png,signicon6_png,signicon5_png,signicon4_png,signicon3_png,signicon2_png,signicon_blood_png,signbtn4_png,signbtn3_png,signbtn2_png,signbtn1_png,signbg_png,sign_quan88_png,sign_quan8_png,sign_quan58_png,sign_quan38_png,sign_quan28_png,sign_quan16_png,sign_quan15_png,sign_quan12_png,sign_line2_png,sign_line_png,sign_light_png,sign_icon1_png,sign_quan10_png,sign_quan23_png,sign_quan36_png,sign_quan25_png,sign_quan35_png,sign_quan30_png,sign_mask_png,signitemno_png,signitemyes_png,unsignbtn_png,virprizebg_png,lightdi_png",
"name": "sign"
},
{
......@@ -241,7 +241,7 @@
"name": "helpGroup"
},
{
"keys": "virprizebg_png",
"keys": "virprizebg_png,lightdi_png",
"name": "preload"
}
],
......@@ -5391,6 +5391,11 @@
"url": "assets/sign/virprizebg.png",
"type": "image",
"name": "virprizebg_png"
},
{
"url": "assets/sign/lightdi.png",
"type": "image",
"name": "lightdi_png"
}
]
}
\ No newline at end of file
......@@ -38,7 +38,9 @@
</e:Button>
<e:Group id="prizegroup" width="750" height="1206" x="0" y="0">
<e:Rect id="mask1" fillAlpha="0.8" x="0" y="0" scaleX="1" scaleY="1" width="750" height="1206"/>
<e:Group id="lightbot" width="750" height="1206" x="0" y="0"/>
<e:Group id="lightbot" width="750" height="1206" x="0" y="0">
<e:Image source="lightdi_png" scaleX="1" scaleY="1" horizontalCenter="0" y="293"/>
</e:Group>
<e:Group id="giftbox" width="750" height="1206"/>
<e:Group id="contmid" width="750" height="1206" anchorOffsetX="375" x="375" anchorOffsetY="603" y="603">
<e:Image id="prizeimg" scaleX="2" scaleY="2" y="537" source="" horizontalCenter="0"/>
......
......@@ -110,7 +110,7 @@ export default class SignPanel extends Panel {
const list: any[] = [{}, {}, {}, {}, {}, {}, {}];
console.log("签到数据",configs);
// console.log("签到数据",configs);
var btnv:boolean = false;
list.forEach((ele, index) => {
ele.index = index;
......@@ -130,7 +130,7 @@ export default class SignPanel extends Panel {
this.signidx = index;
btnv = true;
}
console.log("今日签到数据",index,this.signidx);
// console.log("今日签到数据",index,this.signidx);
this.todayidx = index;
} else if (index == tomorrowIndex) {
ele.btn = 3;
......@@ -268,8 +268,8 @@ export default class SignPanel extends Panel {
this["btn2"].visible = false;
this.tweenGroup(this['contmid'],"close",function(){
this["prizegroup"].visible = false;
if(movieClips["signxistar"].parent){
movieClips["signxistar"].parent.removeChild(movieClips["signxistar"]);
if(movieClips["signfastar"].parent){
movieClips["signfastar"].parent.removeChild(movieClips["signfastar"]);
}
//签到完毕
this.changeSignToday();
......@@ -363,7 +363,7 @@ export default class SignPanel extends Panel {
var itemid = customInfo.itemId;
var propType = -1;
console.log("签到完成,今日奖励",customInfo);
// console.log("签到完成,今日奖励",customInfo);
//奖品类型,none无奖励, object实物,
// virtual虚拟商品,coupon券,
// 道具prop,元宝coin,体力times,
......@@ -383,7 +383,7 @@ export default class SignPanel extends Panel {
// this['prizeimg2'].visible = true;
// this['prizeimg2'].source = `http://yun.duiba.com.cn/db_games/${window['imgver']}/${customInfo.itemId}.png`;
console.log("未处理图片",`http://yun.duiba.com.cn/db_games/${window['imgver']}/${customInfo.itemId}.png`);
// console.log("未处理图片",`http://yun.duiba.com.cn/db_games/${window['imgver']}/${customInfo.itemId}.png`);
}
}
this['nums'].text ='x'+ prizeCount;
......@@ -419,19 +419,18 @@ export default class SignPanel extends Panel {
//圆点炸开动画,1-44
//吸星动画底,1-121
//闪烁星星,1-84
if(movieClips['signxistar']){//必放底
this['lightbot'].addChild(movieClips['signxistar']);
// movieClips['signxistar'].gotoAndPlay(1,1);
movieClips['signxistar'].gotoAndStop(1);
movieClips['signxistar'].alpha = 0;
}
this["lightbot"].alpha = 1;
if(this.showsxbtn||!this['prizeimg'].visible){//手动关闭
this.autoClose = false;
this['contmid'].visible = false;
//礼盒动画播放完毕,弹出奖励,奖励弹出完毕弹出收下按钮
if(this.showsxbtn){//是第七天并且奖励是礼盒
if(movieClips['signxistar']){//必放底///现改为仅礼盒有
this['lightbot'].addChild(movieClips['signxistar']);
movieClips['signxistar'].gotoAndStop(1);
this["lightbot"].alpha = 0;
}
this['giftbox'].visible = true;
this['giftbox'].alpha = 1;
if(movieClips['signgiftbox']){
......@@ -471,7 +470,13 @@ export default class SignPanel extends Panel {
this.itemEffect("shake");
this.playShineDot();
//调整
egret.Tween.get(this["lightbot"]).set({
alpha:0.3
})
.to({
alpha:1,
},150)
return;
await wait(1000);
this["prizegroup"].visible = false;
......@@ -665,7 +670,7 @@ export default class SignPanel extends Panel {
initSvgas() {
var resPath = getResPath();
if(!svgaParser) svgaParser = new window["SVGA"].Parser();
var svgas = ["signgiftbox", "signsandot", "signshine", "signxistar"];
var svgas = ["signgiftbox", "signsandot", "signshine", "signfastar","signxistar"];
for (let i = 0; i < svgas.length; i++) {
if (movieClips[svgas[i]]){
this.addMvListener(svgas[i]);
......@@ -684,9 +689,13 @@ export default class SignPanel extends Panel {
var mvwidth:number;
var mvheight:number;
if(mvname=="signxistar"){//底图
mvwidth = 761;
if(mvname=="signxistar"){
mvheight = 625;
mv.y = (boxheight-mvheight)/2;
}
else if(mvname=="signfastar"){//底图
mvwidth = 750;
mvheight = 1554;
mv.x = (boxwidth-mvwidth)/2;
mv.y = (boxheight-mvheight)/2;
}else if(mvname=="signshine"){
......@@ -698,7 +707,7 @@ export default class SignPanel extends Panel {
mvheight = 210;
mv.y = -mvheight;
}else if(mvname=="signgiftbox"){
mv.y = 120;
}
movieClips[svgas[i]] = mv;
......@@ -709,27 +718,27 @@ export default class SignPanel extends Panel {
}
}
completeCall:{signxistar:Function,signshine:Function,signsandot:Function,signgiftbox:Function} = {
signxistar:null,signshine:null,signsandot:null,signgiftbox:null
completeCall:{signfastar:Function,signshine:Function,signsandot:Function,signgiftbox:Function,signxistar:Function} = {
signfastar:null,signshine:null,signsandot:null,signgiftbox:null,signxistar:null
};
enterFrameCall:{signxistar:Function,signshine:Function,signsandot:Function,signgiftbox:Function} = {
signxistar:null,signshine:null,signsandot:null,signgiftbox:null
enterFrameCall:{signfastar:Function,signshine:Function,signsandot:Function,signgiftbox:Function,signxistar:Function} = {
signfastar:null,signshine:null,signsandot:null,signgiftbox:null,signxistar:null
};
addMvListener(mvname){
if(this.completeCall[mvname]){
this.completeCall[mvname] = null;
}
this.completeCall[mvname] = function(e) {
if(mvname=="signxistar"){
if(mvname=="signfastar"){
if(this.autoClose){
e.target.stop()
if (e.target.parent) {
e.target.parent.removeChild(e.target)
}
this["prizegroup"].visible = false;
egret.Tween.get(this).to({factor: 1}, 500).call(this.moveOver, this);
// this["prizegroup"].visible = false;
// egret.Tween.get(this).to({factor: 1}, 500).call(this.moveOver, this);
}else{
// movieClips["signxistar"].gotoAndStop(120);
// movieClips["signfastar"].gotoAndStop(120);
}
}else{
e.target.stop()
......@@ -737,10 +746,12 @@ export default class SignPanel extends Panel {
e.target.parent.removeChild(e.target)
}
}
// if(mvname=="signshine"){
// movieClips['signxistar'].alpha = 1;
// movieClips['signxistar'].gotoAndPlay(1,1);
// }
if(mvname=="signshine"){
if(this.autoClose){
this["prizegroup"].visible = false;
egret.Tween.get(this).to({factor: 1}, 500).call(this.moveOver, this);
}
}
}.bind(this);
movieClips[mvname].addEventListener(egret.Event.COMPLETE, this.completeCall[mvname], this)
if(mvname=="signshine"){
......@@ -749,18 +760,18 @@ export default class SignPanel extends Panel {
}
this.enterFrameCall[mvname] = function(e){
var curframe = movieClips['signshine'].currentFrame;
if(curframe==20){
egret.Tween.get(movieClips['signxistar'])
.set({
alpha:0
})
.to({
alpha:1,
},200)
.call(()=>{
movieClips['signxistar'].gotoAndPlay(1,1);
},this);
}
// if(curframe==20){
// egret.Tween.get(movieClips['signfastar'])
// .set({
// alpha:0
// })
// .to({
// alpha:1,
// },200)
// .call(()=>{
// movieClips['signfastar'].gotoAndPlay(1,1);
// },this);
// }
}.bind(this);
movieClips['signshine'].addEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname] ,this);
......@@ -770,23 +781,39 @@ export default class SignPanel extends Panel {
}
this.enterFrameCall[mvname] = function(e){
var curframe = movieClips['signgiftbox'].currentFrame;
if(curframe==5){
// egret.Tween.get(movieClips['signxistar'])
// .set({
// alpha:0
// })
// .to({
// alpha:1,
// },200)
// .call(()=>{
// movieClips['signxistar'].gotoAndPlay(1,1);
// },this);
if(curframe==50){
egret.Tween.get(this["lightbot"]).set({
alpha:0.3
})
.to({
alpha:1,
},150)
.call(()=>{
movieClips['signxistar'].gotoAndPlay(1,1);
},this);
}
else if(curframe==150){
egret.Tween.get(this['giftbox'])
.to({
alpha:0
},200);
if(movieClips['signxistar']&&movieClips['signxistar'].parent){
movieClips['signxistar'].parent.removeChild(movieClips['signxistar']);
}
if(movieClips['signfastar']){//必放底///现改为仅礼盒有
this['lightbot'].addChild(movieClips['signfastar']);
movieClips['signfastar'].gotoAndStop(1);
egret.Tween.get(movieClips['signfastar']).set({
alpha:0
})
.to({
alpha:1,
},150)
.call(()=>{
movieClips['signfastar'].gotoAndPlay(1,1);
},this);
}
this.playShineDot();
this.tweenShowGroup();
}
......@@ -794,11 +821,20 @@ export default class SignPanel extends Panel {
movieClips['signgiftbox'].addEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname],this);
}else if(mvname=="signxistar"){
if(this.enterFrameCall[mvname]){
this.enterFrameCall[mvname] = null;
}
this.enterFrameCall[mvname] = function(e){
var curframe = movieClips["signxistar"].currentFrame;
}
movieClips["signxistar"].addEventListener(egret.Event.ENTER_FRAME,this.enterFrameCall[mvname],this);
}
// if(mvname=="signxistar"){//开始收
// if(mvname=="signfastar"){//开始收
// let fun1;
// movieClips['signxistar'].addEventListener(egret.Event.ENTER_FRAME,fun1 = function(e){
// var curframe = movieClips['signxistar'].currentFrame;
// movieClips['signfastar'].addEventListener(egret.Event.ENTER_FRAME,fun1 = function(e){
// var curframe = movieClips['signfastar'].currentFrame;
// if(curframe>=80){
// e.target.stop()
// if (e.target.parent) {
......@@ -812,7 +848,7 @@ export default class SignPanel extends Panel {
}
rmMvListener(){
var svgas = ["signgiftbox", "signsandot", "signshine", "signxistar"];
var svgas = ["signgiftbox", "signsandot", "signshine", "signfastar"];
for (let i = 0; i < svgas.length; i++) {
let mvname = svgas[i];
if(movieClips[mvname]&&this.completeCall[mvname]){
......
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