Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
a4599ff1
Commit
a4599ff1
authored
Oct 16, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
42cd5d46
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
49 deletions
+24
-49
.DS_Store
egret/.DS_Store
+0
-0
roundthumb.png
egret/ScrollBar/roundthumb.png
+0
-0
track_sb.png
egret/ScrollBar/track_sb.png
+0
-0
RuleSkin.exml
egret/resource/skins/RuleSkin.exml
+5
-0
VScrollBarSkin.exml
egret/resource/skins/VScrollBarSkin.exml
+4
-0
RulePanel.ts
egret/src/rulePanel/RulePanel.ts
+10
-15
Panel.ts
egret/src/views/Panel.ts
+4
-33
getRule.json
mock/json/getRule.json
+1
-1
No files found.
egret/.DS_Store
View file @
a4599ff1
No preview for this file type
egret/ScrollBar/roundthumb.png
0 → 100644
View file @
a4599ff1
933 Bytes
egret/ScrollBar/track_sb.png
0 → 100644
View file @
a4599ff1
933 Bytes
egret/resource/skins/RuleSkin.exml
View file @
a4599ff1
...
...
@@ -9,4 +9,9 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller
id=
"scroller"
width=
"526"
x=
"112"
height=
"597"
y=
"331"
>
<e:Group
width=
"100%"
>
<e:Label
id=
"labContent"
width=
"100%"
text=
""
lineSpacing=
"10"
size=
"30"
multiline=
"true"
textColor=
"0x333333"
/>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
egret/resource/skins/VScrollBarSkin.exml
0 → 100644
View file @
a4599ff1
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"skins.VScrollBarSkin"
minWidth=
"8"
minHeight=
"20"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Image
id=
"thumb"
source=
"roundthumb_png"
scale9Grid=
"3,3,2,2"
height=
"30"
width=
"8"
horizontalCenter=
"0"
/>
</e:Skin>
egret/src/rulePanel/RulePanel.ts
View file @
a4599ff1
...
...
@@ -2,22 +2,17 @@ import Panel from "../views/Panel";
import
{
NetManager
}
from
'../../libs/tw/manager/NetManager'
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
class
RulePanel
extends
Panel
{
constructor
()
{
super
();
public
labContent
:
eui
.
Label
;
public
scroller
:
eui
.
Scroller
;
start
()
{
NetManager
.
ins
.
getRule
(()
=>
{
var
tx
:
egret
.
TextField
=
new
egret
.
TextField
;
tx
.
width
=
this
.
stage
.
stageWidth
-
220
;
tx
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
DataManager
.
ins
.
getRuleData
?
DataManager
.
ins
.
getRuleData
.
ruleText
:
(
DataManager
.
ins
.
ajaxElementData
?
DataManager
.
ins
.
ajaxElementData
.
rule
:
(
window
[
'ruleCFG'
]
?
window
[
'ruleCFG'
]
:
"规则"
)
)
);
tx
.
x
=
110
;
tx
.
y
=
330
;
tx
.
textColor
=
0x333333
;
this
.
addChild
(
tx
);
})
this
.
addRule
();
});
}
private
addRule
()
{
// this.labContent.textFlow = alien.Utils.parseHtmlText(content);
this
.
labContent
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
DataManager
.
ins
.
getRuleData
.
ruleText
);
}
protected
get
skinKey
()
{
return
'Rule'
}
...
...
egret/src/views/Panel.ts
View file @
a4599ff1
...
...
@@ -6,45 +6,21 @@ export default class Panel extends ComponentBase {
}
initEvents
()
{
if
(
this
.
closeBtns
&&
this
.
closeBtns
.
length
>
0
)
{
if
(
this
.
closeBtns
&&
this
.
closeBtns
.
length
>
0
)
{
this
.
closeBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
btn
=>
{
if
(
btn
)
btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
)
}
if
(
this
.
confirmBtns
&&
this
.
confirmBtns
.
length
>
0
){
this
.
confirmBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
)
}
if
(
this
.
creditsOutBtns
&&
this
.
creditsOutBtns
.
length
>
0
){
this
.
creditsOutBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
creditsOut
,
this
)
}
)
}
}
removeEvents
()
{
if
(
this
.
closeBtns
&&
this
.
closeBtns
.
length
>
0
)
{
if
(
this
.
closeBtns
&&
this
.
closeBtns
.
length
>
0
)
{
this
.
closeBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
)
}
if
(
this
.
confirmBtns
&&
this
.
confirmBtns
.
length
>
0
){
this
.
confirmBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
)
}
if
(
this
.
creditsOutBtns
&&
this
.
creditsOutBtns
.
length
>
0
){
this
.
creditsOutBtns
.
forEach
(
btn
=>
{
if
(
btn
)
btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
creditsOut
,
this
)
}
btn
=>
{
if
(
btn
)
btn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchTap
,
this
)
}
)
}
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
protected
get
confirmBtns
():
eui
.
Button
[]
{
return
[
this
[
'confirmBtn'
]]}
protected
get
creditsOutBtns
():
eui
.
Button
[]
{
return
[
this
[
'creditsOutBtn'
]]
}
onTouchTap
():
any
{
this
.
hidePanel
();
...
...
@@ -54,10 +30,5 @@ export default class Panel extends ComponentBase {
this
.
destroy
();
this
.
dispatchEvent
(
new
egret
.
Event
(
'onDestroy'
));
}
creditsOut
(){
this
.
destroy
();
this
.
dispatchEvent
(
new
egret
.
Event
(
'onCreditsOut'
));
}
}
\ No newline at end of file
mock/json/getRule.json
View file @
a4599ff1
"测试排行榜图片<font color=
\"
0xff0000
\"
>展示测</font> 试排行榜图片展示测试排行榜图片展示测试排行榜图片展示测试排行榜图片展示测试排行榜图片展示<br>测试排行榜图片展示<br>测试排行榜图片展示<br>测试排行榜图片展示<br>测试排行榜图片展示<br>测试排行榜图片展示<br><br><ul><li>使得发达省份</li><li>fdsgdfgdfg</li><li>阿斯达斯的</li><li>阿斯达斯的</li></ul>阿斯达斯的<br>阿萨德阿萨德<br><ul><li>131232132132</li></ul><ol><li>都市风格豆腐干豆腐干</li><li>的风格豆腐干豆腐干</li><li>豆腐干dfgdfgdfgg豆腐干豆腐干</li><li>但是法国豆腐干豆腐干豆腐干</li></ol><h4><ol><li>但是复苏的发达省份第三方<a href=
\"
http://baidu.com/
\"
data-tag=
\"
is-link
\"
title=
\"
Link: http://baidu.com
\"
>http://baidu.com/</a></li></ol></h4>"
\ No newline at end of file
"1.玩家通过控制按压屏幕时长来控制猫咪跨出去的步伐的大小,步伐越大分数越高
\n
2. 避开道路上的线条和陷阱,踩中则游戏结束
\n
3.每局游戏都有一次积分复活的机会,当用户积分不足的情况下则不会出现提醒"
\ No newline at end of file
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