Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yyh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
yyh
Commits
e8f57f50
Commit
e8f57f50
authored
Dec 09, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
812449f7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
22 deletions
+73
-22
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-1
trans_bg.jpg
egret/resource/assets/transfer/trans_bg.jpg
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
TransSkin.exml
egret/resource/skins/TransSkin.exml
+5
-4
Main.ts
egret/src/Main.ts
+10
-5
TransScene.ts
egret/src/yazuwei/TransScene.ts
+51
-11
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
e8f57f50
...
@@ -235,7 +235,7 @@ export class NetManager extends ABNetManager {
...
@@ -235,7 +235,7 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
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
=
{
const
net
:
INetData
=
{
name
:
'yyh_pollingAnimationState'
,
name
:
'yyh_pollingAnimationState'
,
uri
:
'/projectx/1/invite_2/pollingAnimationState.do'
,
uri
:
'/projectx/1/invite_2/pollingAnimationState.do'
,
...
...
egret/resource/assets/transfer/trans_bg.jpg
0 → 100644
View file @
e8f57f50
70.3 KB
egret/resource/default.res.json
View file @
e8f57f50
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
},
},
{
{
"name"
:
"preload"
,
"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"
:
[
"resources"
:
[
...
@@ -1108,6 +1108,11 @@
...
@@ -1108,6 +1108,11 @@
"name"
:
"transferrecord_item_bg_png"
,
"name"
:
"transferrecord_item_bg_png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"url"
:
"assets/transferrecord/transferrecord_item_bg.png"
"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
egret/resource/skins/TransSkin.exml
View file @
e8f57f50
<?xml version="1.0" encoding="utf-8"?>
<?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: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: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>
</e:Skin>
\ No newline at end of file
egret/src/Main.ts
View file @
e8f57f50
...
@@ -47,6 +47,8 @@ import SloganPanel from './yazuwei/SloganPanel';
...
@@ -47,6 +47,8 @@ import SloganPanel from './yazuwei/SloganPanel';
import
TeamShareScene
from
'./yazuwei/TeamShareScene'
;
import
TeamShareScene
from
'./yazuwei/TeamShareScene'
;
import
TransScene
from
'./yazuwei/TransScene'
;
import
TransScene
from
'./yazuwei/TransScene'
;
import
FinishPanel
from
'./yazuwei/FinishPanel'
;
import
FinishPanel
from
'./yazuwei/FinishPanel'
;
import
{
loadSvgaRes
}
from
'./loadSvga'
;
import
{
getResPath
}
from
'./utils'
;
class
Main
extends
MainBase
{
class
Main
extends
MainBase
{
protected
registerModules
()
{
protected
registerModules
()
{
...
@@ -162,11 +164,14 @@ class Main extends MainBase {
...
@@ -162,11 +164,14 @@ class Main extends MainBase {
// 创建游戏场景
// 创建游戏场景
protected
createGameScene
()
{
protected
createGameScene
()
{
super
.
createGameScene
();
super
.
createGameScene
();
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
TransScene
);
// SceneCtrl.instance.change(ModuleTypes.TransScene);
// PanelCtrl.instance.show(ModuleTypes.SloganPanel);
// // PanelCtrl.instance.show(ModuleTypes.SloganPanel);
Waiting
.
instance
.
hide
();
// Waiting.instance.hide();
// return;
return
;
loadSvgaRes
(
getResPath
()
+
'resource/assets/svgas/standby.svga'
);
loadSvgaRes
(
getResPath
()
+
'resource/assets/svgas/trans.svga'
);
//获取UA信息
//获取UA信息
let
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
let
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
console
.
log
(
userAgent
);
console
.
log
(
userAgent
);
...
...
egret/src/yazuwei/TransScene.ts
View file @
e8f57f50
...
@@ -3,11 +3,13 @@ import { getResPath } from "../utils";
...
@@ -3,11 +3,13 @@ import { getResPath } from "../utils";
import
{
loadSvgaRes
,
loadSvga
}
from
"../loadSvga"
;
import
{
loadSvgaRes
,
loadSvga
}
from
"../loadSvga"
;
import
{
wait
}
from
"../GameConst"
;
import
{
wait
}
from
"../GameConst"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
TransScene
extends
Scene
{
export
default
class
TransScene
extends
Scene
{
_bg
:
SVGA
.
EgretMovieClip
;
_standby
:
SVGA
.
EgretMovieClip
;
_standby
:
SVGA
.
EgretMovieClip
;
_trans
:
SVGA
.
EgretMovieClip
;
_trans
:
SVGA
.
EgretMovieClip
;
_is
Left
=
false
;
_is
InviterSide
=
false
;
protected
get
skinKey
()
{
return
'Trans'
}
protected
get
skinKey
()
{
return
'Trans'
}
constructor
(
data
)
{
constructor
(
data
)
{
...
@@ -22,25 +24,55 @@ export default class TransScene extends Scene {
...
@@ -22,25 +24,55 @@ export default class TransScene extends Scene {
// ]);
// ]);
//要区分是分享者,还是被分享者
//要区分是分享者,还是被分享者
this
.
_standby
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/standby.svga'
,
this
)
as
SVGA
.
EgretMovieClip
;
this
.
_bg
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/bg.svga'
,
this
[
'group'
])
as
SVGA
.
EgretMovieClip
;
this
.
_trans
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/trans.svga'
,
this
)
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
.
_standby
.
visible
=
false
;
this
.
_trans
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/trans.svga'
,
this
[
'group'
])
as
SVGA
.
EgretMovieClip
;
this
.
_trans
.
visible
=
false
;
this
.
_trans
.
visible
=
false
;
this
.
changeToStandBy
();
this
.
changeToStandBy
();
setTimeout
(()
=>
{
this
[
'group'
].
addChild
(
this
[
'waitTips'
]);
this
.
changeToTrans
(
);
this
[
'group'
].
addChild
(
this
[
'matchingTips'
]
);
},
2000
);
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
{
}
else
{
this
.
setRightPhone
();
//邀请者
this
.
setRightPhone
();
//进入页面后发送确认消息
NetManager
.
ins
.
yyh_updateAnimationState
(
sharecode
,
1
,(
success
)
=>
{
if
(
success
)
{
this
.
addShareEvent
();
}
});
}
}
}
}
addShareEvent
(){
}
setRightPhone
()
{
setRightPhone
()
{
this
.
_standby
.
x
=
-
750
;
this
.
_standby
.
x
=
-
750
;
this
.
_trans
.
x
=
-
750
;
this
.
_trans
.
x
=
-
750
;
...
@@ -53,14 +85,22 @@ export default class TransScene extends Scene {
...
@@ -53,14 +85,22 @@ export default class TransScene extends Scene {
}
}
async
changeToTrans
()
{
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
);
await
wait
(
100
);
this
.
_standby
.
visible
=
false
;
this
.
_standby
.
visible
=
false
;
this
.
_trans
.
visible
=
true
;
this
.
_trans
.
visible
=
true
;
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
this
.
_trans
.
once
(
egret
.
Event
.
COMPLETE
,
()
=>
{
console
.
log
(
'COMPLETE'
)
console
.
log
(
'COMPLETE'
)
this
.
changeToStandBy
();
this
.
changeToStandBy
();
if
(
!
this
.
_is
Left
)
{
if
(
!
this
.
_is
InviterSide
)
{
this
.
_standby
.
x
=
40
;
this
.
_standby
.
x
=
40
;
this
.
_standby
.
y
=
10
;
this
.
_standby
.
y
=
10
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment