Commit e8f57f50 authored by wildfirecode's avatar wildfirecode

1

parent 812449f7
......@@ -235,7 +235,7 @@ export class NetManager extends ABNetManager {
this.send(net);
}
public yyh_pollingAnimationState(callback: Function, shareCode, pollingCheck: Function, pollingCount = 5): void {
public yyh_pollingAnimationState(callback: Function, shareCode, pollingCheck: Function, pollingCount = 99999): void {
const net: INetData = {
name: 'yyh_pollingAnimationState',
uri: '/projectx/1/invite_2/pollingAnimationState.do',
......
......@@ -10,7 +10,7 @@
},
{
"name": "preload",
"keys": "hand_png,hand2_png,ydlight_png,ydlight2_png,ydline_png,mapBtn_png,maphz_png,mappass_png,mram_png,mrbg_png,mrcx_png,mrhg_png,mrhz_png,mrmg_png,mrrb_png,mrtb_png,mrtitle_png,mrxg_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_png,pkBtn_png,pkcirle_png,pkloselight_png,pkloselogo_png,pkmyline_png,pkotherline_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkwinbg_png,pkwinBtn_png,pkwinlogo_png,finishbg_png,finishBtn_png,finishlight_png,finishlogo_png,lessscorebg_png,lessscoreBtn_png,rankbg_png,rankbg2_png,rankline_png,rankmybg_png,rulebg_png,sharebg_png,shareBtn_png,sharelab_png,sharerecordbg_png,sharerecordBtn_png,背景@2x_png,BG_png,chaoxian_png,CHNaomen_png,CHNhangzhou_png,CHNtaiwan_png,CHNxianggang_png,closeBtn_png,fireBtn_png,getBtn_png,hanguo_png,horn_png,littletitle_png,lockBtn_png,menggu_png,prizeBtn_png,rankBtn_png,recordBtn_png,riben_png,ruleBtn_png,startBtn_png,starttitle_png,teamBtn_png,unchaoxian_png,unCHNaomen_png,unCHNhangzhou_png,unCHNtaiwan_png,unCHNxianggang_png,unhanguo_png,unmenggu_png,unriben_png,waitBtn_png,yylogo_png,closeBtn2_png,xuanshiBG_png,xuanshiBtn_png,ranklight_png,pknoton_png,box_png,head1_png,pkpeacelight_png,pkwinlight_png,pkendbg_png,mapshareBtn_png,pkscorebg2_png,hand3_png,hand22_png,ydlight3_png,ydlight22_png,ydline2_png,mapBtn2_png,maphz2_png,mappass2_png,mapshareBtn2_png,mram2_png,mrbg2_png,mrcx2_png,mrhg2_png,mrhz2_png,mrmg2_png,mrrb2_png,mrtb2_png,mrtitle2_png,mrxg2_png,box2_png,head12_png,pkadd2_png,pkagainBtn2_png,pkaskBtn2_png,pkBG2_png,pkBtn2_png,pkcirle2_png,pkendbg2_png,pkloselight2_png,pkloselogo2_png,pkmyline2_png,pknoton2_png,pkotherline2_png,pkpeacelight2_png,pkprizebg2_png,pkprizeBtn2_png,pkrulebg2_png,pkrulebtn2_png,pkscorebg3_png,pkscorebg22_png,pkwinbg2_png,pkwinBtn2_png,pkwinlight2_png,pkwinlogo2_png,finishbg2_png,finishBtn2_png,finishlight2_png,finishlogo2_png,lessscorebg2_png,lessscoreBtn2_png,rankbg3_png,rankbg22_png,ranklight2_png,rankline2_png,rankmybg2_png,rulebg2_png,sharebg2_png,shareBtn2_png,sharelab2_png,sharerecordbg2_png,sharerecordBtn2_png,背景@2x2_png,BG2_png,chaoxian2_png,CHNaomen2_png,CHNhangzhou2_png,CHNtaiwan2_png,CHNxianggang2_png,closeBtn3_png,fireBtn2_png,getBtn2_png,hanguo2_png,horn2_png,littletitle2_png,lockBtn2_png,menggu2_png,prizeBtn2_png,rankBtn2_png,recordBtn2_png,riben2_png,ruleBtn2_png,startBtn2_png,starttitle2_png,teamBtn2_png,unchaoxian2_png,unCHNaomen2_png,unCHNhangzhou2_png,unCHNtaiwan2_png,unCHNxianggang2_png,unhanguo2_png,unmenggu2_png,unriben2_png,waitBtn2_png,yylogo2_png,bg2_png,progress2_png,closeBtn4_png,xuanshiBG2_png,xuanshiBtn2_png,transfer _toast1_png,transfer _toast2_png,transfer _toast3_png,teamshare_btn_png,teamshare_bg_jpg,slogan_btn_png,slogan_bg_png,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png,certificate_jpg,certificate_cover_png,certificate_btn_png,pkpeacelogo_png,transferrecord_bg_png,transferrecord_item_bg_png"
"keys": "hand_png,hand2_png,ydlight_png,ydlight2_png,ydline_png,mapBtn_png,maphz_png,mappass_png,mram_png,mrbg_png,mrcx_png,mrhg_png,mrhz_png,mrmg_png,mrrb_png,mrtb_png,mrtitle_png,mrxg_png,pkadd_png,pkagainBtn_png,pkaskBtn_png,pkBG_png,pkBtn_png,pkcirle_png,pkloselight_png,pkloselogo_png,pkmyline_png,pkotherline_png,pkprizebg_png,pkprizeBtn_png,pkrulebg_png,pkrulebtn_png,pkscorebg_png,pkwinbg_png,pkwinBtn_png,pkwinlogo_png,finishbg_png,finishBtn_png,finishlight_png,finishlogo_png,lessscorebg_png,lessscoreBtn_png,rankbg_png,rankbg2_png,rankline_png,rankmybg_png,rulebg_png,sharebg_png,shareBtn_png,sharelab_png,sharerecordbg_png,sharerecordBtn_png,背景@2x_png,BG_png,chaoxian_png,CHNaomen_png,CHNhangzhou_png,CHNtaiwan_png,CHNxianggang_png,closeBtn_png,fireBtn_png,getBtn_png,hanguo_png,horn_png,littletitle_png,lockBtn_png,menggu_png,prizeBtn_png,rankBtn_png,recordBtn_png,riben_png,ruleBtn_png,startBtn_png,starttitle_png,teamBtn_png,unchaoxian_png,unCHNaomen_png,unCHNhangzhou_png,unCHNtaiwan_png,unCHNxianggang_png,unhanguo_png,unmenggu_png,unriben_png,waitBtn_png,yylogo_png,closeBtn2_png,xuanshiBG_png,xuanshiBtn_png,ranklight_png,pknoton_png,box_png,head1_png,pkpeacelight_png,pkwinlight_png,pkendbg_png,mapshareBtn_png,pkscorebg2_png,hand3_png,hand22_png,ydlight3_png,ydlight22_png,ydline2_png,mapBtn2_png,maphz2_png,mappass2_png,mapshareBtn2_png,mram2_png,mrbg2_png,mrcx2_png,mrhg2_png,mrhz2_png,mrmg2_png,mrrb2_png,mrtb2_png,mrtitle2_png,mrxg2_png,box2_png,head12_png,pkadd2_png,pkagainBtn2_png,pkaskBtn2_png,pkBG2_png,pkBtn2_png,pkcirle2_png,pkendbg2_png,pkloselight2_png,pkloselogo2_png,pkmyline2_png,pknoton2_png,pkotherline2_png,pkpeacelight2_png,pkprizebg2_png,pkprizeBtn2_png,pkrulebg2_png,pkrulebtn2_png,pkscorebg3_png,pkscorebg22_png,pkwinbg2_png,pkwinBtn2_png,pkwinlight2_png,pkwinlogo2_png,finishbg2_png,finishBtn2_png,finishlight2_png,finishlogo2_png,lessscorebg2_png,lessscoreBtn2_png,rankbg3_png,rankbg22_png,ranklight2_png,rankline2_png,rankmybg2_png,rulebg2_png,sharebg2_png,shareBtn2_png,sharelab2_png,sharerecordbg2_png,sharerecordBtn2_png,背景@2x2_png,BG2_png,chaoxian2_png,CHNaomen2_png,CHNhangzhou2_png,CHNtaiwan2_png,CHNxianggang2_png,closeBtn3_png,fireBtn2_png,getBtn2_png,hanguo2_png,horn2_png,littletitle2_png,lockBtn2_png,menggu2_png,prizeBtn2_png,rankBtn2_png,recordBtn2_png,riben2_png,ruleBtn2_png,startBtn2_png,starttitle2_png,teamBtn2_png,unchaoxian2_png,unCHNaomen2_png,unCHNhangzhou2_png,unCHNtaiwan2_png,unCHNxianggang2_png,unhanguo2_png,unmenggu2_png,unriben2_png,waitBtn2_png,yylogo2_png,bg2_png,progress2_png,closeBtn4_png,xuanshiBG2_png,xuanshiBtn2_png,transfer _toast1_png,transfer _toast2_png,transfer _toast3_png,teamshare_btn_png,teamshare_bg_jpg,slogan_btn_png,slogan_bg_png,sharestarter_sharebtn_png,sharestarter_btn_png,sharestarter_bg_jpg,joinshare_bg_jpg,joinshare_btn_png,confirm_bg_png,confirm_btn_png,关闭按钮 _png,certificate_jpg,certificate_cover_png,certificate_btn_png,pkpeacelogo_png,transferrecord_bg_png,transferrecord_item_bg_png,trans_bg_jpg"
}
],
"resources": [
......@@ -1108,6 +1108,11 @@
"name": "transferrecord_item_bg_png",
"type": "image",
"url": "assets/transferrecord/transferrecord_item_bg.png"
},
{
"name": "trans_bg_jpg",
"type": "image",
"url": "assets/transfer/trans_bg.jpg"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ShareSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group x="0" verticalCenter="0">
<e:Group id="group" x="0" verticalCenter="0">
<e:Image source="trans_bg_jpg" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Image id="waitTips" source="transfer _toast1_png" horizontalCenter="0" x="129" scaleX="1" scaleY="1" verticalCenter="0" visible="false"/>
<e:Image id="matchingTips" source="transfer _toast2_png" horizontalCenter="0" x="129" scaleX="1" scaleY="1" verticalCenter="0"/>
<e:Image id="shareTips" source="transfer _toast3_png" horizontalCenter="0" x="129" scaleX="1" scaleY="1" verticalCenter="0" visible="false"/>
</e:Group>
<e:Image source="transfer _toast1_png" y="324.64" horizontalCenter="0"/>
<e:Image source="transfer _toast2_png" y="469.66" horizontalCenter="0"/>
<e:Image source="transfer _toast3_png" y="139.55" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
......@@ -47,6 +47,8 @@ import SloganPanel from './yazuwei/SloganPanel';
import TeamShareScene from './yazuwei/TeamShareScene';
import TransScene from './yazuwei/TransScene';
import FinishPanel from './yazuwei/FinishPanel';
import { loadSvgaRes } from './loadSvga';
import { getResPath } from './utils';
class Main extends MainBase {
protected registerModules() {
......@@ -162,11 +164,14 @@ class Main extends MainBase {
// 创建游戏场景
protected createGameScene() {
super.createGameScene();
SceneCtrl.instance.change(ModuleTypes.TransScene);
// PanelCtrl.instance.show(ModuleTypes.SloganPanel);
Waiting.instance.hide();
// SceneCtrl.instance.change(ModuleTypes.TransScene);
// // PanelCtrl.instance.show(ModuleTypes.SloganPanel);
// Waiting.instance.hide();
// return;
loadSvgaRes(getResPath() + 'resource/assets/svgas/standby.svga');
loadSvgaRes(getResPath() + 'resource/assets/svgas/trans.svga');
return;
//获取UA信息
let userAgent = navigator.userAgent.toLowerCase();
console.log(userAgent);
......
......@@ -3,11 +3,13 @@ import { getResPath } from "../utils";
import { loadSvgaRes, loadSvga } from "../loadSvga";
import { wait } from "../GameConst";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class TransScene extends Scene {
_bg: SVGA.EgretMovieClip;
_standby: SVGA.EgretMovieClip;
_trans: SVGA.EgretMovieClip;
_isLeft = false;
_isInviterSide = false;
protected get skinKey() { return 'Trans' }
constructor(data) {
......@@ -22,23 +24,53 @@ export default class TransScene extends Scene {
// ]);
//要区分是分享者,还是被分享者
this._standby = await loadSvga(getResPath() + 'resource/assets/svgas/standby.svga', this) as SVGA.EgretMovieClip;
this._trans = await loadSvga(getResPath() + 'resource/assets/svgas/trans.svga', this) as SVGA.EgretMovieClip;
this._bg = await loadSvga(getResPath() + 'resource/assets/svgas/bg.svga', this['group']) as SVGA.EgretMovieClip;
this._bg.visible = false;
this._standby = await loadSvga(getResPath() + 'resource/assets/svgas/standby.svga', this['group']) as SVGA.EgretMovieClip;
this._standby.visible = false;
this._trans = await loadSvga(getResPath() + 'resource/assets/svgas/trans.svga', this['group']) as SVGA.EgretMovieClip;
this._trans.visible = false;
this.changeToStandBy();
setTimeout(() => {
this.changeToTrans();
}, 2000);
this['group'].addChild(this['waitTips']);
this['group'].addChild(this['matchingTips']);
this['group'].addChild(this['shareTips']);
if (this._isLeft) {
// this['matchingTips'];
// this['shareTips'];
const sharecode = 0;
if (this._isInviterSide) {//邀请者
this['matchingTips'].visible=true;
NetManager.ins.yyh_pollingAnimationState((success) => {
const data = DataManager.ins.getData('yyh_pollingAnimationState').data;
if (data == 1) {//被邀请者确认邀请
this['waitTips'].visible = true;
}
if (data == 2) {//用户取消
//暂时无法取消
}
if (data == 3) {//摇一摇
this.changeToTrans();
}
}, sharecode, () => {
const data = DataManager.ins.getData('yyh_pollingAnimationState').data;
return data === null || data === 0;
})
} else {
this.setRightPhone();
this.setRightPhone();//邀请者
//进入页面后发送确认消息
NetManager.ins.yyh_updateAnimationState(sharecode,1,(success)=>{
if(success) {
this.addShareEvent();
}
});
}
}
addShareEvent(){
}
setRightPhone() {
......@@ -53,14 +85,22 @@ export default class TransScene extends Scene {
}
async changeToTrans() {
this._trans.gotoAndPlay(1, true);
this._trans.gotoAndPlay(40, true);
wait(500).then(async () => {
this._bg.gotoAndPlay(1, true);
await wait(100);
this._bg.visible = true;
this._bg.once(egret.Event.COMPLETE, () => {
this._bg.stop();
}, this);
});
await wait(100);
this._standby.visible = false;
this._trans.visible = true;
this._trans.once(egret.Event.COMPLETE, () => {
console.log('COMPLETE')
this.changeToStandBy();
if (!this._isLeft) {
if (!this._isInviterSide) {
this._standby.x = 40;
this._standby.y = 10;
}
......
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