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
ebb29f80
Commit
ebb29f80
authored
Nov 04, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7c9156b3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
18 deletions
+44
-18
hbCutTime_rule_btn.png
egret/resource/assets/hbCutTime/hbCutTime_rule_btn.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-1
HbCutTimeSkin.exml
egret/resource/skins/HbCutTimeSkin.exml
+9
-1
HbGameSkin.exml
egret/resource/skins/HbGameSkin.exml
+6
-3
HbCutTime.ts
egret/src/panels/HongbaoRain/HbCutTime.ts
+11
-4
HbGame.ts
egret/src/panels/HongbaoRain/HbGame.ts
+12
-9
No files found.
egret/resource/assets/hbCutTime/hbCutTime_rule_btn.png
0 → 100644
View file @
ebb29f80
1.55 KB
egret/resource/default.res.json
View file @
ebb29f80
...
...
@@ -177,7 +177,7 @@
"name"
:
"turntableprize"
},
{
"keys"
:
"hbCutTimeFont_fnt,hbCutTimeFont_png,hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png"
,
"keys"
:
"hbCutTimeFont_fnt,hbCutTimeFont_png,hbCutTime_bg_png,hbCutTime_btn_disable_png,hbCutTime_btn_enable_png,hbCutTime_cutLine_disable_png,hbCutTime_cutLine_enable_png
,hbCutTime_rule_btn_png
"
,
"name"
:
"hbcuttime"
},
{
...
...
@@ -3242,6 +3242,11 @@
"url"
:
"assets/hbGame/hbGameScoreFont.png"
,
"type"
:
"image"
,
"name"
:
"hbGameScoreFont_png"
},
{
"url"
:
"assets/hbCutTime/hbCutTime_rule_btn.png"
,
"type"
:
"image"
,
"name"
:
"hbCutTime_rule_btn_png"
}
]
}
\ No newline at end of file
egret/resource/skins/HbCutTimeSkin.exml
View file @
ebb29f80
...
...
@@ -13,7 +13,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"ok_btn"
label=
""
y=
"6
92
"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0"
>
<e:Button
id=
"ok_btn"
label=
""
y=
"6
68
"
anchorOffsetX=
"150"
anchorOffsetY=
"48"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbCutTime_btn_enable_png"
source.down=
"hbCutTime_btn_enable_png"
source.disabled=
"hbCutTime_btn_disable_png"
/>
...
...
@@ -21,4 +21,12 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"rule_btn"
label=
""
y=
"740"
horizontalCenter=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"hbCutTime_rule_btn_png"
source.down=
"hbCutTime_rule_btn_png"
source.disabled=
"hbCutTime_rule_btn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
egret/resource/skins/HbGameSkin.exml
View file @
ebb29f80
...
...
@@ -11,8 +11,11 @@
<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
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"
/>
<e:Label
text=
"点击所有动物均可累积双份红包"
y=
"520"
fontFamily=
"FZY3JW"
horizontalCenter=
"0"
/>
<e:Image
y=
"566"
source=
"hbGame_lion_touch_png"
horizontalCenter=
"-37.5"
/>
<e:Image
y=
"597"
source=
"hbGame_+2_png"
horizontalCenter=
"82"
/>
<e:Image
id=
"readyCutTime"
y=
"95"
horizontalCenter=
"0"
x=
"10"
source=
"hbGame_1_png"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/src/panels/HongbaoRain/HbCutTime.ts
View file @
ebb29f80
...
...
@@ -6,10 +6,11 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
* 红包雨倒计时
*/
export
default
class
HbCutTime
extends
Panel
{
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
cutTime
:
eui
.
Image
;
public
closeBtn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Button
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
cutTime
:
eui
.
Image
;
public
closeBtn
:
eui
.
Button
;
public
ok_btn
:
eui
.
Button
;
public
rule_btn
:
eui
.
Button
;
private
cutTimer
:
CutTimer
=
null
;
...
...
@@ -38,12 +39,18 @@ export default class HbCutTime extends Panel {
super
.
initEvents
();
this
.
closeBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap_closeBtn
,
this
);
this
.
ok_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchOK
,
this
);
this
.
rule_btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
}
private
tapRuleBtn
(){
}
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
);
this
.
rule_btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
tapRuleBtn
,
this
);
}
onTouchTap_closeBtn
()
{
...
...
egret/src/panels/HongbaoRain/HbGame.ts
View file @
ebb29f80
...
...
@@ -2,18 +2,19 @@ import Panel from "../../../libs/new_wx/components/Panel";
import
RainMgr
from
"./RainMgr"
;
import
CutTimer
from
"../../CutTimer"
;
import
{
GDispatcher
}
from
"../../../libs/tc/util/GDispatcher"
;
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
ready
Tips
:
eui
.
Image
;
public
readyCutTime
:
eui
.
Image
;
public
rainGroup
:
eui
.
Group
;
public
scoreGroup
:
eui
.
Group
;
public
scoreLabel
:
eui
.
BitmapLabel
;
public
cutTimeLabel
:
eui
.
BitmapLabel
;
public
readyGroup
:
eui
.
Group
;
public
ready
CutTime
:
eui
.
Image
;
public
tipLabel
:
eui
.
Label
;
private
rainMgr
:
RainMgr
=
null
;
private
cutTime
:
egret
.
Timer
=
null
;
...
...
@@ -35,6 +36,8 @@ export default class HbGame extends Panel {
initUI
()
{
this
.
rainGroup
.
height
=
this
.
width
/
window
.
innerWidth
*
window
.
innerHeight
;
this
.
tipLabel
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
`抢到<b>
${
15
}
</b>个红包才有奖励哦~`
);
this
.
time
=
60
;
this
.
cutTimeLabel
.
text
=
`
${
this
.
time
}
`
}
...
...
@@ -100,8 +103,8 @@ export default class HbGame extends Panel {
}
private
readyTipsEffect
()
{
this
.
ready
Tips
.
alpha
=
0
;
egret
.
Tween
.
get
(
this
.
ready
Tips
).
to
({
alpha
:
1
},
300
).
call
(()
=>
this
.
readyTimeEffect
());
this
.
ready
Group
.
alpha
=
0
;
egret
.
Tween
.
get
(
this
.
ready
Group
).
to
({
alpha
:
1
},
300
).
call
(()
=>
this
.
readyTimeEffect
());
}
protected
onSkinComplete
()
{
...
...
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