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
6b27b6af
Commit
6b27b6af
authored
Nov 04, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ebb29f80
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
16 deletions
+26
-16
hbGame_CutTime_bg.png
egret/resource/assets/hbGame/hbGame_CutTime_bg.png
+0
-0
hbGame_CutTime_btn.png
egret/resource/assets/hbGame/hbGame_CutTime_btn.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
HbGameSkin.exml
egret/resource/skins/HbGameSkin.exml
+5
-4
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+15
-11
No files found.
egret/resource/assets/hbGame/hbGame_CutTime_bg.png
View replaced file @
ebb29f80
View file @
6b27b6af
16.3 KB
|
W:
|
H:
15.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/hbGame/hbGame_CutTime_btn.png
0 → 100644
View file @
6b27b6af
2.01 KB
egret/resource/default.res.json
View file @
6b27b6af
...
...
@@ -189,7 +189,7 @@
"name"
:
"hbnoprize"
},
{
"keys"
:
"hbGameCutTimeFont_fnt,hbGameCutTimeFont_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,hbGame_+1_png,hbGame_bird_touch_png,hbGame_bird_png,hbGame_cattle_png,hbGame_cattle_touch_png,hbGame_hongbao_touch_png,hbGame_+2_png,hbGame_hongbao_png,hbGame_lion_png,hbGame_lion_touch_png,hbGame_pig_touch_png,hbGame_pig_png,hbGame_rabbit_touch_png,hbGame_rabbit_png,hbGameScoreFont_fnt,hbGameScoreFont_png"
,
"keys"
:
"hbGameCutTimeFont_fnt,hbGameCutTimeFont_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,hbGame_+1_png,hbGame_bird_touch_png,hbGame_bird_png,hbGame_cattle_png,hbGame_cattle_touch_png,hbGame_hongbao_touch_png,hbGame_+2_png,hbGame_hongbao_png,hbGame_lion_png,hbGame_lion_touch_png,hbGame_pig_touch_png,hbGame_pig_png,hbGame_rabbit_touch_png,hbGame_rabbit_png,hbGameScoreFont_fnt,hbGameScoreFont_png
,hbGame_CutTime_btn_png
"
,
"name"
:
"hbgame"
},
{
...
...
@@ -3247,6 +3247,11 @@
"url"
:
"assets/hbCutTime/hbCutTime_rule_btn.png"
,
"type"
:
"image"
,
"name"
:
"hbCutTime_rule_btn_png"
},
{
"url"
:
"assets/hbGame/hbGame_CutTime_btn.png"
,
"type"
:
"image"
,
"name"
:
"hbGame_CutTime_btn_png"
}
]
}
\ No newline at end of file
egret/resource/skins/HbGameSkin.exml
View file @
6b27b6af
...
...
@@ -6,10 +6,11 @@
<e:Image
y=
"0"
source=
"hbGame_num_bg_png"
horizontalCenter=
"0"
/>
<e:BitmapLabel
id=
"scoreLabel"
y=
"33"
text=
"0"
horizontalCenter=
"0"
font=
"hbGameScoreFont_fnt"
/>
</e:Group>
<e:Group
y=
"45"
horizontalCenter=
"0"
>
<e:Image
y=
"0"
horizontalCenter=
"0"
source=
"hbGame_CutTime_bg_png"
/>
<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
y=
"45"
horizontalCenter=
"0"
height=
"154"
>
<e:Image
id=
"timeBtn"
y=
"0"
horizontalCenter=
"0"
x=
"10"
source=
"hbGame_CutTime_btn_png"
/>
<e:Image
y=
"25"
horizontalCenter=
"0"
source=
"hbGame_CutTime_bg_png"
/>
<e:Image
y=
"32"
source=
"hbGame_CutTime_progress_png"
horizontalCenter=
"-0.5"
/>
<e:BitmapLabel
id=
"cutTimeLabel"
y=
"67"
text=
"60"
font=
"hbGameCutTimeFont_fnt"
horizontalCenter=
"0.5"
/>
</e:Group>
<e:Group
id=
"readyGroup"
y=
"310.5"
horizontalCenter=
"0"
width=
"560"
height=
"710"
anchorOffsetY=
"0"
>
<e:Label
id=
"tipLabel"
text=
"抢到15个红包才有奖励哦~"
y=
"480"
fontFamily=
"FZY3JW"
horizontalCenter=
"0"
/>
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
6b27b6af
...
...
@@ -8,13 +8,14 @@ import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser";
* 红包雨主游戏
*/
export
default
class
HbGame
extends
Panel
{
public
rainGroup
:
eui
.
Group
;
public
scoreGroup
:
eui
.
Group
;
public
scoreLabel
:
eui
.
BitmapLabel
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
readyGroup
:
eui
.
Group
;
public
readyCutTime
:
eui
.
Image
;
public
tipLabel
:
eui
.
Label
;
public
rainGroup
:
eui
.
Group
;
public
scoreGroup
:
eui
.
Group
;
public
scoreLabel
:
eui
.
BitmapLabel
;
public
timeBtn
:
eui
.
Image
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
readyGroup
:
eui
.
Group
;
public
tipLabel
:
eui
.
Label
;
public
readyCutTime
:
eui
.
Image
;
private
rainMgr
:
RainMgr
=
null
;
private
cutTime
:
egret
.
Timer
=
null
;
...
...
@@ -39,7 +40,7 @@ export default class HbGame extends Panel {
this
.
tipLabel
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
`抢到<b>
${
15
}
</b>个红包才有奖励哦~`
);
this
.
time
=
60
;
this
.
cutTimeLabel
.
text
=
`
${
this
.
time
}
`
this
.
cutTimeLabel
.
text
=
`
${
this
.
time
}
`
}
// 加分
...
...
@@ -53,7 +54,7 @@ export default class HbGame extends Panel {
private
gameOver
()
{
this
.
cutTime
.
stop
();
this
.
cutTime
.
removeEventListener
(
egret
.
TimerEvent
.
TIMER
,
this
.
timeCallFun
,
this
);
this
.
cutTime
.
removeEventListener
(
egret
.
TimerEvent
.
TIMER
,
this
.
timeCallFun
,
this
);
GDispatcher
.
dispatchEvent
(
'hbRainGameOver'
);
}
...
...
@@ -67,9 +68,9 @@ export default class HbGame extends Panel {
this
.
cutTime
.
start
();
}
private
timeCallFun
(){
private
timeCallFun
()
{
this
.
cutTimeLabel
.
text
=
`
${
--
this
.
time
}
`
;
if
(
this
.
time
<=
0
){
if
(
this
.
time
<=
0
)
{
this
.
gameOver
();
}
}
...
...
@@ -94,6 +95,9 @@ export default class HbGame extends Panel {
egret
.
Tween
.
get
(
obj
).
to
({
scaleX
:
_scaleMax
,
scaleY
:
_scaleMax
,
alpha
:
0.1
},
t2
).
call
(()
=>
{
this
.
readyGroup
.
visible
=
false
;
this
.
startGame
();
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
8
},
100
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
timeBtn
).
to
({
y
:
0
},
100
);
});
})
});
})
...
...
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