Commit de570a1c authored by zjz1994's avatar zjz1994

修改bug

parent ccdd1e88
......@@ -28,7 +28,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="numLabel" text="仅差3人可获得" y="822" size="28" horizontalCenter="0" textColor="0xc17343"/>
<e:Label id="numLabel" text="仅差3人可获得" y="822" size="28" horizontalCenter="0" textColor="0xc17343" fontFamily="FZY3JW"/>
<e:Label id="cutTimeLabel" text="将在23:43:21后失效" y="1023" size="28" textColor="0xffffff" horizontalCenter="0" fontFamily="FZY3JW"/>
<e:Scroller width="545" height="90" y="906" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="0.5">
<e:Group anchorOffsetX="0">
......@@ -42,7 +42,7 @@
</e:layout>
</e:Group>
</e:Scroller>
<e:Group id="wxShareTip" width="750" height="1624" y="0" x="0">
<e:Group id="wxShareTip" width="750" height="1624" y="0" x="0" visible="false">
<e:Rect fillAlpha="0.7" left="0" top="0" right="0" bottom="0"/>
<e:Image source="invite_wx_tip_png" x="458" y="0"/>
</e:Group>
......
......@@ -161,6 +161,7 @@ let svgaParser;
//三个toast和bonusTime
const movieClips: any = {};
let cannomvdata:any = null;
//红包炸弹弹框名字
const redBombPanelName = "RedBombAlert";
......@@ -458,6 +459,16 @@ export default class MainScene extends Scene {
// alert(error.message);
})
}
//炮台的动画数据
if(cannomvdata){
}else{
svgaParser.load(resPath + 'resource/assets/svgas/canno1.svga',(videoItem)=>{
cannomvdata = videoItem;
})
}
}
/**
* 一个炮台有三个附属动画
......
......@@ -304,7 +304,8 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传0
*/
function generateCode(callback: Function, channel: CodeChannels, shareCode: string = "0") {
var activityCode = getParamString("snactCode") || "ACT0000002664";//上线必须改回来,动态获取
// var activityCode = getParamString("snactCode") || "ACT0000002664";//上线必须改回来,动态获取
var activityCode = "ACT0000002664";
var sceneCode = channel;
var token = shareCode || "0";
window['$'].ajax({
......
......@@ -21,6 +21,8 @@ import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
// callback(mv);
// })
// }
let svgaParser;
let handmoveclip=null;
export default class Turntable extends Panel {
public panel: eui.Group;
public start_btn: eui.Button;
......@@ -38,18 +40,15 @@ export default class Turntable extends Panel {
this.data = data;
}
hand;
// hand;
async start(data?) {
super.start();
NetManager.ins.showLog(getlogItem(45));
// this['container'].addChild(this.data.mv);
this.hand = await loadSvga(getResPath() + 'resource/assets/svgas/hand.svga', this['container2'])
var startpy = this["start_btn"].y;
startpy = 281;
var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y;
var handy = this['container2'].globalToLocal(0,whandy).y-1334/2;
this.hand.y = handy;
// this.hand = await loadSvga(getResPath() + 'resource/assets/svgas/hand.svga', this['container2']);
// console.log("hand位置",startpy,whandy,this.stage.stageHeight/2,this.height/2,this['container2'].y);
this['container2'].touchEnabled = false;
......@@ -58,10 +57,22 @@ export default class Turntable extends Panel {
this['btnLabel'].text = "";
this.initUI();
}
public onShowAnim(){
public async onShowAnim(){
let targetY:number;
targetY = 0;
egret.Tween.get(this).set({ y: -200 }).to({ y: targetY }, 500, egret.Ease.quartOut);
egret.Tween.get(this).set({ y: -200 }).to({ y: targetY }, 500, egret.Ease.quartOut)
.call(()=>{
// var startpy = this["start_btn"].y;
// startpy = 281;
// var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y;
// var handy = this['container2'].globalToLocal(0,whandy).y-1334/2;
// this.hand.y = handy;
this.initSvgas();
},this);
}
rulebtn;
......@@ -287,4 +298,29 @@ export default class Turntable extends Panel {
});
// console.log(RotaryData);
}
initSvgas(){
var resPath = getResPath();
if(!svgaParser) svgaParser = new window["SVGA"].Parser();
if(handmoveclip){
this.addHandMv();
}else{
svgaParser.load(resPath + 'resource/assets/svgas/hand.svga', (videoItem) => {
var mv = new window["SVGA"].EgretMovieClip(videoItem);
handmoveclip = mv;
this.addHandMv();
});
}
}
addHandMv(){
if(handmoveclip){
var startpy = this["start_btn"].y;
startpy = 281;
var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y;
var handy = this['container2'].globalToLocal(0,whandy).y-1334/2;
this['container2'].addChild(handmoveclip);
handmoveclip.y = handy;
}
}
}
\ No newline at end of file
......@@ -521,7 +521,7 @@ export class Element extends eui.Component {
return;
}
if (!svgaParser) svgaParser = new window["SVGA"].Parser();
var svgas = ["canno1"]//,"cannofire","cannoparticle","cannolight"];
var svgas = ["canno1"]
for(let i=0;i<svgas.length;i++){
let mvname = svgas[i];
svgaParser.load(resPath + 'resource/assets/svgas/'+mvname+'.svga',(videoItem)=>{
......
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