Commit a83746cb authored by 邱旭's avatar 邱旭

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

parents 3961f05f d07baf53
......@@ -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;
})
}
}
/**
* 一个炮台有三个附属动画
......@@ -1044,6 +1055,17 @@ export default class MainScene extends Scene {
});
var dirType = Tool.getCannoDir(elements[i]);
canno.resetToCannoView(dirType,this);
//添加大炮
if(cannomvdata){
canno.createCanno(cannomvdata);
}else{
if (!svgaParser) svgaParser = new window["SVGA"].Parser();
svgaParser.load(resPath + 'resource/assets/svgas/canno1.svga',(videoItem)=>{
cannomvdata = videoItem;
canno.createCanno(cannomvdata);
})
}
break;
case ElementConfigType.CANNO_BLOCK:
let canno_block:Element = Tool.getElement(ElementType.CANNO_BLOCK);
......
......@@ -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;
......@@ -57,11 +56,26 @@ export default class Turntable extends Panel {
this['nums'].text = `我的元宝:${getHomeData().wealth}`;
this['btnLabel'].text = "";
this.initUI();
if(handmoveclip&&handmoveclip.parent){
handmoveclip.parent.removeChild(handmoveclip);
}
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 +301,30 @@ 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.gotoAndPlay(1);
handmoveclip.y = handy;
}
}
}
\ No newline at end of file
......@@ -509,26 +509,25 @@ export class Element extends eui.Component {
}
this.addChild(this.festivalEle)
}
this.createCanno();
}
//添加炮台
createCanno(){
if(this.type==ElementType.CANNO){
createCanno(videoItem:any){
if(this.type==ElementType.CANNO&&videoItem){
if(this.cannoMoveClip){
if(this.cannoMoveClip.parent){
this.cannoMoveClip.parent.removeChild(this.cannoMoveClip);
}
this.initCannoMoveClidp();
return;
}
if (!svgaParser) svgaParser = new window["SVGA"].Parser();
var svgas = ["canno1"]//,"cannofire","cannoparticle","cannolight"];
for(let i=0;i<svgas.length;i++){
let mvname = svgas[i];
svgaParser.load(resPath + 'resource/assets/svgas/'+mvname+'.svga',(videoItem)=>{
if(mvname=="canno1"){
else{
this.cannoMoveClip = new window["SVGA"].EgretMovieClip(videoItem);
// this.cannoMoveClip.lockStep = true;
this.initCannoMoveClidp();
}
}
}
initCannoMoveClidp(){
var mvwidth = 82;
var mvheight = 132;
this.cannoMoveClip.x = (this.cannoboxwid-mvwidth)/2;
......@@ -537,10 +536,6 @@ export class Element extends eui.Component {
this.cannoMoveClip.gotoAndStop(1);
this.cannoMoveClip.addEventListener(egret.Event.ENTER_FRAME,this.toFrameAni,this);
}
});
}
}
}
stopFrame:number;
/**
* 炮台动画停止
......
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