Commit ecd9bc99 authored by zjz1994's avatar zjz1994

调整svga

parent 0b67e6c2
...@@ -1246,6 +1246,11 @@ export default class MapScene extends Scene { ...@@ -1246,6 +1246,11 @@ export default class MapScene extends Scene {
} }
onTap_signBtn() { onTap_signBtn() {
NetManager.ins.hc_redBombAward((success) => {
PanelCtrl.instance.show('RedBombAlert');
})
return;
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(() => {
PanelCtrl.instance.show('sign'); PanelCtrl.instance.show('sign');
}, window['signActivityId']) }, window['signActivityId'])
......
...@@ -106,6 +106,8 @@ export default class RedBombAlertPanel extends Panel { ...@@ -106,6 +106,8 @@ export default class RedBombAlertPanel extends Panel {
}); });
} }
prizeMv:any;
isShow:boolean = true;
playPrizeAni() { playPrizeAni() {
loadSvga(getResPath() + 'resource/assets/svgas/redbomb_prize.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/redbomb_prize.svga').then(async (mv: any) => {
mv.y = this.alertHeight; mv.y = this.alertHeight;
...@@ -158,10 +160,84 @@ export default class RedBombAlertPanel extends Panel { ...@@ -158,10 +160,84 @@ export default class RedBombAlertPanel extends Panel {
}, 1700); }, 1700);
// for(var mvkey=0;mvkey<mv.) // for(var mvkey=0;mvkey<mv.)
// console.log("红包奖励弹窗",img,mv,mv.getOwnPropertyNames()); // console.log("红包奖励弹窗",img,mv,mv.getOwnPropertyNames());
this.isShow = isShow;
mv.setImage("815207F0-919C-4796-A09E-21868AF337CB", img); mv.setImage("815207F0-919C-4796-A09E-21868AF337CB", img);
this.prizeMv = mv;
if(!this.isShow){
let changeimg = this.getchangeImg();
if(changeimg){
changeimg.anchorOffsetX = 500/2;
changeimg.anchorOffsetY = 233/2;
var cx = changeimg.x;
var cy = changeimg.y;
cx += 500/2;
cy += 500/2;
changeimg.x = cx;
changeimg.y = cy;
}
egret.startTick(this.update,this);
}else{
egret.stopTick(this.update,this);
}
}, 100) }, 100)
}); });
} }
getchangeImg(){
if(this.prizeMv){
let changeimg:egret.Bitmap;
for (var i = 0; i < this.prizeMv.$children.length; i++) {
var n = this.prizeMv.$children[i];
if(n.imageKey == "815207F0-919C-4796-A09E-21868AF337CB"){
changeimg = n;
break;
}
}
return changeimg;
}
}
update(t){
if(this.prizeMv&&!this.isShow){
let changeimg = this.getchangeImg();
if(!changeimg){
return false;
}
var curframe = this.prizeMv.currentFrame;
if(curframe>=180){
changeimg.x = 382;
changeimg.y = 375;
return false;
}
var sx = changeimg.x;
var sy = changeimg.y;
// sx += 500/2;
sy += 233/2;
changeimg.x = 382;
changeimg.y = sy;
console.log("测试红包图",this.prizeMv,sx,sy,this.prizeMv.currentFrame,"宽高设置:"+changeimg.width,changeimg.height);
console.error("缩放设置",changeimg.scaleX,changeimg.scaleY);
// console.log("原大小",swidth,sheight,sx,sy);
// changeimg.anchorOffsetX = 500/2;
// changeimg.anchorOffsetY = 233/2;
// changeimg.scaleX = 3;
// changeimg.scaleY = 3;
// changeimg.x = 500
// changeimg.x =
// changeimg.width = 300;
// changeimg.height = 133;
// changeimg.x = sx+(swidth-changeimg.width)/2;
// changeimg.y = sy+(sheight-changeimg.height)/2;
// console.log("修改image",changeimg);
}
return false;
}
protected get closeBtns(): eui.Button[] { protected get closeBtns(): eui.Button[] {
return [this['closeBtn']] return [this['closeBtn']]
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"timestamp": 1579512019430, "timestamp": 1579512019430,
"data": { "data": {
"option":{ "option":{
"img":"//yun.dui88.com/images/202002/cskn0xnuov.png", "img":"//yun.duiba.com.cn/aurora/assets/b3ea9ed5b85ec4a4c7f8c7f73a802e871d1cc1c4.png",
"categoryType":7, "categoryType":7,
"num":"33", "num":"33",
"propType":null, "propType":null,
......
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