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
639f1b82
Commit
639f1b82
authored
Oct 16, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
839b1d1e
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
60 additions
and
18 deletions
+60
-18
.gitignore
.gitignore
+1
-0
.DS_Store
egret/.DS_Store
+0
-0
startscene_5.tmproject
egret/resource/TextureMerger/startscene_5.tmproject
+1
-0
thumb_pb.png
egret/resource/assets/ProgressBar/thumb_pb.png
+0
-0
track_pb.png
egret/resource/assets/ProgressBar/track_pb.png
+0
-0
optionBtn.png
egret/resource/assets/startScene/optionBtn.png
+0
-0
ruleBtn.png
egret/resource/assets/startScene/ruleBtn.png
+0
-0
default.res.json
egret/resource/default.res.json
+6
-6
StartSkin.exml
egret/resource/skins/StartSkin.exml
+17
-1
Main.ts
egret/src/Main.ts
+1
-0
RulePanel.ts
egret/src/rulePanel/RulePanel.ts
+9
-10
StartScene.ts
egret/src/startScene/StartScene.ts
+24
-0
LayerTypes.ts
egret/src/startScene/data/LayerTypes.ts
+1
-1
No files found.
.gitignore
View file @
639f1b82
...
...
@@ -26,3 +26,4 @@ bin-release
.DS_Store
egret/.DS_Store
**/*/.tmproject
egret/.DS_Store
egret/.DS_Store
View file @
639f1b82
No preview for this file type
egret/resource/TextureMerger/startscene_5.tmproject
0 → 100644
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/assets/ProgressBar/thumb_pb.png
deleted
100644 → 0
View file @
839b1d1e
976 Bytes
egret/resource/assets/ProgressBar/track_pb.png
deleted
100644 → 0
View file @
839b1d1e
970 Bytes
egret/resource/assets/startScene/optionBtn.png
0 → 100644
View file @
639f1b82
760 Bytes
egret/resource/assets/startScene/ruleBtn.png
0 → 100644
View file @
639f1b82
896 Bytes
egret/resource/default.res.json
View file @
639f1b82
...
...
@@ -21,8 +21,8 @@
"name"
:
"guide"
},
{
"
name"
:
"preload
"
,
"
keys"
:
"thumb_pb_png,track_pb_png
"
"
keys"
:
"ruleBtn_png,optionBtn_png
"
,
"
name"
:
"startscene
"
}
],
"resources"
:
[
...
...
@@ -139,14 +139,14 @@
"name"
:
"guide_dialog_png"
},
{
"
name"
:
"thumb_pb_
png"
,
"
url"
:
"assets/startScene/optionBtn.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/ProgressBar/thumb_pb.
png"
"
name"
:
"optionBtn_
png"
},
{
"
name"
:
"track_pb_
png"
,
"
url"
:
"assets/startScene/ruleBtn.
png"
,
"type"
:
"image"
,
"
url"
:
"assets/ProgressBar/track_pb.
png"
"
name"
:
"ruleBtn_
png"
}
]
}
\ No newline at end of file
egret/resource/skins/StartSkin.exml
View file @
639f1b82
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"StartSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Skin
class=
"StartSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Button
id=
"ruleBtn"
label=
""
x=
"29.27"
y=
"42"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"ruleBtn_png"
source.down=
"ruleBtn_png"
source.disabled=
"ruleBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"optionBtn"
label=
""
x=
"632.57"
y=
"42"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"optionBtn_png"
source.down=
"optionBtn_png"
source.disabled=
"optionBtn_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/Main.ts
View file @
639f1b82
...
...
@@ -18,6 +18,7 @@ class Main extends MainBase {
super
.
getData
();
NetManager
.
ins
.
getInfo
();
}
protected
async
createGameScene
()
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
}
...
...
egret/src/rulePanel/RulePanel.ts
View file @
639f1b82
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
()
NetManager
.
ins
.
getRule
(()
=>
{
var
tx
:
egret
.
TextField
=
new
egret
.
TextField
;
constructor
()
{
super
()
;
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
:
...
...
@@ -17,7 +16,7 @@ export default class RulePanel extends Panel {
tx
.
x
=
110
;
tx
.
y
=
330
;
tx
.
textColor
=
0x333333
;
this
.
addChild
(
tx
);
this
.
addChild
(
tx
);
})
}
...
...
egret/src/startScene/StartScene.ts
View file @
639f1b82
...
...
@@ -12,6 +12,8 @@ import BoxOpenState from "./view/BoxOpenState";
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
submitAfterDostart
from
"../../libs/new_tw/ctrls/submitAfterDostart"
;
import
PanelCtrl
from
"../ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
const
{
TouchEvent
}
=
egret
;
export
default
class
StartScene
extends
Scene
{
...
...
@@ -23,6 +25,7 @@ export default class StartScene extends Scene {
static
NET_RANGE
=
200
;
private
_debug
:
debug
;
async
start
(
data
?)
{
this
.
addUI
();
const
t1
=
Date
.
now
()
-
__t0__
;
console
.
log
(
`startScene添加到stage:
${
t1
/
1000
}
s`
)
...
...
@@ -205,6 +208,23 @@ export default class StartScene extends Scene {
});
}
addUI
()
{
const
uiLayer
=
this
.
getLayer
(
LayerTypes
.
ui
);
uiLayer
.
addChild
(
this
[
'ruleBtn'
]);
uiLayer
.
addChild
(
this
[
'optionBtn'
]);
this
[
'ruleBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_ruleBtn
,
this
);
this
[
'optionBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_optionBtn
,
this
);
}
onTap_ruleBtn
()
{
// alert('onTap_ruleBtn');
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
RULE_PANEL
);
}
onTap_optionBtn
()
{
alert
(
'onTap_optionBtn'
)
}
protected
get
layerKeys
()
{
return
[
LayerTypes
.
bg
,
...
...
@@ -213,10 +233,14 @@ export default class StartScene extends Scene {
LayerTypes
.
net
,
LayerTypes
.
box
,
LayerTypes
.
monkey
,
LayerTypes
.
ui
,
LayerTypes
.
top
,
]
}
ruleBtn
:
eui
.
Button
;
optionBtn
:
eui
.
Button
;
protected
get
skinKey
()
{
return
'Start'
}
get
guideView
()
{
return
this
.
_guideView
}
get
monkey
()
{
return
this
.
_monkey
}
...
...
egret/src/startScene/data/LayerTypes.ts
View file @
639f1b82
enum
LayerTypes
{
bg
,
kids
,
box
,
net
,
monkey
,
guide
,
top
bg
,
kids
,
box
,
net
,
monkey
,
guide
,
top
,
ui
}
export
default
LayerTypes
\ 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