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
42cd5d46
Commit
42cd5d46
authored
Oct 16, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
639f1b82
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
50 additions
and
20 deletions
+50
-20
alert_2.tmproject
egret/resource/TextureMerger/alert_2.tmproject
+0
-1
guide_4.tmproject
egret/resource/TextureMerger/guide_4.tmproject
+0
-1
loading_1.tmproject
egret/resource/TextureMerger/loading_1.tmproject
+0
-1
msg_0.tmproject
egret/resource/TextureMerger/msg_0.tmproject
+0
-1
preload_5.tmproject
egret/resource/TextureMerger/preload_5.tmproject
+0
-1
rule_3.tmproject
egret/resource/TextureMerger/rule_3.tmproject
+0
-1
startscene_5.tmproject
egret/resource/TextureMerger/startscene_5.tmproject
+0
-1
default.thm.json
egret/resource/default.thm.json
+1
-0
RuleSkin.exml
egret/resource/skins/RuleSkin.exml
+12
-0
panelCtrl.ts
egret/src/ctrls/panelCtrl.ts
+27
-3
Guide.ts
egret/src/startScene/Guide.ts
+2
-1
StartScene.ts
egret/src/startScene/StartScene.ts
+8
-8
layers.ts
egret/src/views/layers.ts
+0
-1
No files found.
egret/resource/TextureMerger/alert_2.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"alert_2","version":5,"files":["../assets/alert/Bitmap-4.png","../assets/alert/Bitmap-2.png","../assets/alert/Bitmap-1.png"]}
\ No newline at end of file
egret/resource/TextureMerger/guide_4.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"guide_4","version":5,"files":["../assets/startScene/guide/guide_tips.png","../assets/startScene/guide/guide_hand.png","../assets/startScene/guide/guide_dialog.png"]}
\ No newline at end of file
egret/resource/TextureMerger/loading_1.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"loading_1","version":5,"files":["../assets/loading/bg.png","../assets/loading/progress.png"]}
\ No newline at end of file
egret/resource/TextureMerger/msg_0.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"msg_0","version":5,"files":["../assets/msg/msgBg.png","../assets/msg/x.png","../assets/msg/sureBtn.png"]}
\ No newline at end of file
egret/resource/TextureMerger/preload_5.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload_5","version":5,"files":["../assets/ProgressBar/thumb_pb.png","../assets/ProgressBar/track_pb.png"]}
\ No newline at end of file
egret/resource/TextureMerger/rule_3.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule_3","version":5,"files":["../assets/rule/ruleBg.png","../assets/rule/X.png"]}
\ No newline at end of file
egret/resource/TextureMerger/startscene_5.tmproject
deleted
100644 → 0
View file @
639f1b82
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"startscene_5","version":5,"files":["../assets/startScene/ruleBtn.png","../assets/startScene/optionBtn.png"]}
\ No newline at end of file
egret/resource/default.thm.json
View file @
42cd5d46
...
...
@@ -2,6 +2,7 @@
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/RuleSkin.exml"
,
"resource/skins/StartSkin.exml"
],
"path"
:
"resource/default.thm.json"
...
...
egret/resource/skins/RuleSkin.exml
0 → 100644
View file @
42cd5d46
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"RuleSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
id=
"ruleBg"
source=
"ruleBg_png"
horizontalCenter=
"0.5"
verticalCenter=
"-231"
/>
<e:Button
id=
"closeBtn"
label=
""
horizontalCenter=
"296.5"
verticalCenter=
"-561"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"X_png"
source.down=
"X_png"
source.disabled=
"X_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
egret/src/ctrls/panelCtrl.ts
View file @
42cd5d46
...
...
@@ -2,8 +2,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import
Panel
from
"../views/Panel"
;
export
default
class
PanelCtrl
{
private
_parent
:
egret
.
Sprite
;
private
_mask
:
egret
.
Shape
;
private
_mask
:
egret
.
Sprite
;
static
_instance
:
PanelCtrl
;
static
get
instance
()
{
return
PanelCtrl
.
_instance
||
(
PanelCtrl
.
_instance
=
new
PanelCtrl
())
...
...
@@ -14,11 +13,31 @@ export default class PanelCtrl {
}
show
(
type
:
ModuleTypes
,
data
?)
{
this
.
addMask
();
const
cls
=
this
.
_panelClassMap
[
type
];
const
panel
:
Panel
=
new
cls
(
data
);
this
.
_current
=
panel
;
panel
.
start
(
data
);
this
.
add
(
panel
);
egret
.
Tween
.
get
(
panel
).
set
({
y
:
-
200
}).
to
({
y
:
0
},
500
,
egret
.
Ease
.
getBackOut
(
2
));
}
addMask
()
{
if
(
!
this
.
_mask
)
{
this
.
_mask
=
new
egret
.
Sprite
();
this
.
_mask
.
touchEnabled
=
true
;
this
.
_mask
.
graphics
.
beginFill
(
0
,
.
7
);
this
.
_mask
.
graphics
.
drawRect
(
0
,
0
,
750
,
1624
);
this
.
_mask
.
graphics
.
endFill
();
}
this
.
_mask
.
alpha
=
1
;
this
.
_parent
.
addChild
(
this
.
_mask
);
}
removeMask
()
{
if
(
this
.
_mask
)
{
egret
.
Tween
.
get
(
this
.
_mask
).
to
({
alpha
:
0
},
200
).
call
(
()
=>
this
.
_parent
.
removeChild
(
this
.
_mask
),
this
);
}
}
private
add
(
panel
:
Panel
)
{
...
...
@@ -27,7 +46,12 @@ export default class PanelCtrl {
}
private
remove
(
panel
:
Panel
)
{
this
.
_parent
.
removeChild
(
panel
);
const
tw
=
egret
.
Tween
.
get
(
panel
);
tw
.
to
({
y
:
1624
},
400
,
egret
.
Ease
.
getBackIn
(
2
))
.
call
(()
=>
{
this
.
_parent
.
removeChild
(
panel
);
this
.
removeMask
();
},
this
);
}
private
onPanelHide
(
e
:
egret
.
Event
)
{
...
...
egret/src/startScene/Guide.ts
View file @
42cd5d46
export
default
class
Guide
extends
egret
.
S
hap
e
{
export
default
class
Guide
extends
egret
.
S
prit
e
{
destroy
():
any
{
this
.
parent
.
removeChild
(
this
);
}
constructor
(
parent
:
egret
.
Sprite
)
{
super
();
this
.
touchEnabled
=
true
;
this
.
graphics
.
beginFill
(
0
,
.
7
);
this
.
graphics
.
drawRect
(
0
,
0
,
parent
.
stage
.
stageWidth
,
parent
.
stage
.
stageHeight
);
this
.
graphics
.
endFill
();
...
...
egret/src/startScene/StartScene.ts
View file @
42cd5d46
...
...
@@ -55,17 +55,19 @@ export default class StartScene extends Scene {
this
.
getLayer
(
LayerTypes
.
net
).
addChild
(
net
);
this
.
_net
=
net
;
this
.
getLayer
(
LayerTypes
.
bg
).
touchEnabled
=
true
;
if
(
__debug__
)
{
this
.
_debug
=
new
debug
(
this
.
getLayer
(
LayerTypes
.
top
));
}
}
addTouchEvent
()
{
this
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
this
.
getLayer
(
LayerTypes
.
bg
).
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
}
removeTouchEvent
()
{
this
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
this
.
getLayer
(
LayerTypes
.
bg
).
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onTouch
,
this
);
}
private
_catchedBox
:
Box
;
...
...
@@ -216,26 +218,24 @@ export default class StartScene extends Scene {
this
[
'optionBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_optionBtn
,
this
);
}
onTap_ruleBtn
()
{
// alert('onTap_ruleBtn');
onTap_ruleBtn
(
e
:
egret
.
Event
)
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
RULE_PANEL
);
}
onTap_optionBtn
()
{
alert
(
'onTap_optionBtn'
)
onTap_optionBtn
(
e
:
egret
.
Event
)
{
}
protected
get
layerKeys
()
{
return
[
LayerTypes
.
bg
,
LayerTypes
.
kids
,
LayerTypes
.
ui
,
LayerTypes
.
guide
,
LayerTypes
.
net
,
LayerTypes
.
box
,
LayerTypes
.
monkey
,
LayerTypes
.
ui
,
LayerTypes
.
top
,
]
}
...
...
egret/src/views/layers.ts
View file @
42cd5d46
class
Layers
extends
eui
.
UILayer
{
private
_topLayer
:
egret
.
Sprite
;
private
_popupLayer
:
egret
.
Sprite
;
...
...
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