Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
89ab2f16
Commit
89ab2f16
authored
Nov 01, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e31c8680
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
90 additions
and
54 deletions
+90
-54
hbCutTimeFont.fnt
egret/resource/assets/hbCutTime/hbCutTimeFont.fnt
+11
-11
hbCutTimeFont.fnt的副本
egret/resource/assets/hbCutTime/hbCutTimeFont.fnt的副本
+14
-0
hbCutTimeFont.png
egret/resource/assets/hbCutTime/hbCutTimeFont.png
+0
-0
hbGame_1.png
egret/resource/assets/hbGame/hbGame_1.png
+0
-0
hbGame_2.png
egret/resource/assets/hbGame/hbGame_2.png
+0
-0
hbGame_3.png
egret/resource/assets/hbGame/hbGame_3.png
+0
-0
default.res.json
egret/resource/default.res.json
+16
-16
HbGameSkin.exml
egret/resource/skins/HbGameSkin.exml
+9
-13
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+39
-13
No files found.
egret/resource/assets/hbCutTime/hbCutTimeFont.fnt
View file @
89ab2f16
{"file":"hbCutTimeFont.png","frames":{
"0":{"x":
116,"y":83,"w":55,"h":81,"offX":0
,"offY":0,"sourceW":55,"sourceH":81},
"1":{"x":5
7,"y":166
,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"2":{"x":1
74,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"3":{"x":
58,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"4":{"x":
116,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"5":{"x":
0,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"6":{"x":
0
,"y":166,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"7":{"x":
173
,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"8":{"x":
58,"y":83,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"9":{"x":0,"y":83,"w":5
6,"h":81,"offX":0,"offY":0,"sourceW":56
,"sourceH":81},
"0":{"x":
0,"y":0,"w":56,"h":81,"offX":-0.5
,"offY":0,"sourceW":55,"sourceH":81},
"1":{"x":5
8,"y":0
,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"2":{"x":1
15,"y":0,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"3":{"x":
171,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"4":{"x":
0,"y":166,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"5":{"x":
114,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"6":{"x":
57
,"y":166,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"7":{"x":
57
,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"8":{"x":
172,"y":0,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"9":{"x":0,"y":83,"w":5
5,"h":81,"offX":0,"offY":0,"sourceW":55
,"sourceH":81},
"分":{"x":153,"y":166,"w":36,"h":34,"offX":3,"offY":23,"sourceW":42,"sourceH":81},
"秒":{"x":114,"y":166,"w":37,"h":35,"offX":2,"offY":23,"sourceW":42,"sourceH":81},
"时":{"x":191,"y":166,"w":34,"h":34,"offX":4,"offY":23,"sourceW":42,"sourceH":81}}}
"时":{"x":191,"y":166,"w":34,"h":34,"offX":4,"offY":23,"sourceW":42,"sourceH":81}}}
\ No newline at end of file
egret/resource/assets/hbCutTime/hbCutTimeFont.fnt的副本
0 → 100644
View file @
89ab2f16
{"file":"hbCutTimeFont.png","frames":{
"0":{"x":116,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"1":{"x":57,"y":166,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"2":{"x":174,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"3":{"x":58,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"4":{"x":116,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"5":{"x":0,"y":0,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"6":{"x":0,"y":166,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"7":{"x":173,"y":83,"w":55,"h":81,"offX":0,"offY":0,"sourceW":55,"sourceH":81},
"8":{"x":58,"y":83,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"9":{"x":0,"y":83,"w":56,"h":81,"offX":0,"offY":0,"sourceW":56,"sourceH":81},
"分":{"x":153,"y":166,"w":36,"h":34,"offX":3,"offY":23,"sourceW":42,"sourceH":81},
"秒":{"x":114,"y":166,"w":37,"h":35,"offX":2,"offY":23,"sourceW":42,"sourceH":81},
"时":{"x":191,"y":166,"w":34,"h":34,"offX":4,"offY":23,"sourceW":42,"sourceH":81}}}
egret/resource/assets/hbCutTime/hbCutTimeFont.png
View replaced file @
e31c8680
View file @
89ab2f16
10.9 KB
|
W:
|
H:
8.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/hbGame/1.png
→
egret/resource/assets/hbGame/
hbGame_
1.png
View file @
89ab2f16
File moved
egret/resource/assets/hbGame/2.png
→
egret/resource/assets/hbGame/
hbGame_
2.png
View file @
89ab2f16
File moved
egret/resource/assets/hbGame/3.png
→
egret/resource/assets/hbGame/
hbGame_
3.png
View file @
89ab2f16
File moved
egret/resource/default.res.json
View file @
89ab2f16
...
...
@@ -189,7 +189,7 @@
"name"
:
"hbnoprize"
},
{
"keys"
:
"
1_png,2_png,3_png,hbGameCutTimeFont_fnt,hbGameCutTimeFont_png,hbGameNumFont_fnt,hbGameNumFont_png,hbGame_CutTime_bg_png,hbGame_CutTime_progress_png,hbGame_num_bg_png,hbGame_tips
_png"
,
"keys"
:
"
hbGameCutTimeFont_fnt,hbGameCutTimeFont_png,hbGameNumFont_fnt,hbGameNumFont_png,hbGame_CutTime_bg_png,hbGame_CutTime_progress_png,hbGame_num_bg_png,hbGame_tips_png,hbGame_1_png,hbGame_2_png,hbGame_3
_png"
,
"name"
:
"hbgame"
},
{
...
...
@@ -2998,21 +2998,6 @@
"type"
:
"image"
,
"name"
:
"hbNoPrize_btn_png"
},
{
"url"
:
"assets/hbGame/1.png"
,
"type"
:
"image"
,
"name"
:
"1_png"
},
{
"url"
:
"assets/hbGame/2.png"
,
"type"
:
"image"
,
"name"
:
"2_png"
},
{
"url"
:
"assets/hbGame/3.png"
,
"type"
:
"image"
,
"name"
:
"3_png"
},
{
"url"
:
"assets/hbGame/hbGameCutTimeFont.fnt"
,
"type"
:
"font"
,
...
...
@@ -3127,6 +3112,21 @@
"url"
:
"assets/redbagalert/redbagalert红包任务.png"
,
"type"
:
"image"
,
"name"
:
"redbagalert红包任务_png"
},
{
"url"
:
"assets/hbGame/hbGame_1.png"
,
"type"
:
"image"
,
"name"
:
"hbGame_1_png"
},
{
"url"
:
"assets/hbGame/hbGame_2.png"
,
"type"
:
"image"
,
"name"
:
"hbGame_2_png"
},
{
"url"
:
"assets/hbGame/hbGame_3.png"
,
"type"
:
"image"
,
"name"
:
"hbGame_3_png"
}
]
}
\ No newline at end of file
egret/resource/skins/HbGameSkin.exml
View file @
89ab2f16
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"
InviteSkin
"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
<e:Skin
class=
"
HbGame
"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Button
id=
"ok_btn"
label=
""
y=
"764"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbNoPrize_btn_png"
source.down=
"hbNoPrize_btn_png"
source.disabled=
"hbNoPrize_btn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
text=
"红包雨"
y=
"325"
size=
"124"
textColor=
"0xff0000"
horizontalCenter=
"0"
/>
<e:Group
x=
"610"
y=
"48"
>
<e:Group
right=
"40"
top=
"45"
>
<e:Image
y=
"0"
source=
"hbGame_num_bg_png"
horizontalCenter=
"0"
/>
<e:BitmapLabel
y=
"33"
font=
"hbGameNumFont_fnt"
text=
"0"
horizontalCenter=
"0"
/>
<e:BitmapLabel
id=
"numLabel"
y=
"33"
font=
"hbGameNumFont_fnt"
text=
"0"
horizontalCenter=
"0"
/>
</e:Group>
<e:Group
y=
"45"
horizontalCenter=
"0"
>
<e:Image
y=
"0"
horizontalCenter=
"0"
source=
"hbGame_CutTime_bg_png"
/>
<e:BitmapLabel
y=
"65"
text=
"60"
font=
"hbGameCutTimeFont_fnt"
horizontalCenter=
"0"
/>
<e:Image
y=
"30"
source=
"hbGame_CutTime_progress_png"
horizontalCenter=
"-0.5"
/>
<e:BitmapLabel
id=
"cutTimeLabel"
y=
"65"
text=
"60"
font=
"hbGameCutTimeFont_fnt"
horizontalCenter=
"0"
/>
</e:Group>
<e:Group
id=
"readyGroup"
y=
"310.5"
horizontalCenter=
"0"
width=
"560"
height=
"500"
>
<e:Image
id=
"readyTips"
y=
"0"
horizontalCenter=
"0"
source=
"hbGame_tips_png"
/>
<e:Image
id=
"readyCutTime"
y=
"118"
horizontalCenter=
"0"
x=
"10"
source=
"hbGame_1_png"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
89ab2f16
...
...
@@ -91,7 +91,7 @@ export default class MapScene extends Scene {
this
.
sendInvite
();
PanelCtrl
.
instance
.
show
(
"HbCutTi
me"
);
// PanelCtrl.instance.show("HbGa
me");
this
.
updateMyInfo
();
this
.
updateAdData
();
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
89ab2f16
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
import
getHomeData
from
"../../getHomeData"
;
import
{
changeMapScene
}
from
"../../startScene/StartScene"
;
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
addAdComp
}
from
"../BoxPanel"
;
import
Utils
from
"../../Utils"
;
import
CutTimer
from
"../../CutTimer"
;
/**
* 红包雨主游戏
*/
export
default
class
HbGame
extends
Panel
{
public
closeBtn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Button
;
public
numLabel
:
eui
.
BitmapLabel
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
readyGroup
:
eui
.
Group
;
public
readyTips
:
eui
.
Image
;
public
readyCutTime
:
eui
.
Image
;
constructor
(
data
)
{
super
();
...
...
@@ -28,19 +24,49 @@ export default class HbGame extends Panel {
}
private
readyTimeEffect
()
{
let
obj
=
this
.
readyCutTime
,
_scaleMin
=
0.1
// 缩放最小值
,
_scaleMax
=
1.7
// 缩放最大值
,
t1
=
450
// 缩放第一阶段时间
,
tw
=
50
// 缩放中间停留时间 // t1 + tw + t2 = 1000; 1秒
,
t2
=
500
// 缩放第二阶段时间
,
_ease
=
egret
.
Ease
.
quadInOut
;
this
.
readyGroup
.
visible
=
true
;
obj
.
source
=
"hbGame_3_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
obj
.
source
=
"hbGame_2_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
obj
.
source
=
"hbGame_1_png"
,
obj
.
scaleX
=
obj
.
scaleY
=
_scaleMin
,
obj
.
alpha
=
1
;
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
},
t1
,
_ease
).
wait
(
tw
).
call
(()
=>
{
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
this
.
readyGroup
.
visible
=
false
;
})
});
})
});
})
});
}
private
readyTipsEffect
()
{
this
.
readyTips
.
alpha
=
0
;
egret
.
Tween
.
get
(
this
.
readyTips
).
to
({
alpha
:
1
},
300
).
call
(()
=>
this
.
readyTimeEffect
());
}
protected
onSkinComplete
()
{
this
.
readyGroup
.
visible
=
false
;
setTimeout
(()
=>
this
.
readyTipsEffect
(),
1000
);
}
initEvents
()
{
super
.
initEvents
();
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
removeEvents
()
{
super
.
removeEvents
();
this
.
closeBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
}
onTouchTap_closeBtn
()
{
...
...
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