Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duiba-egret-games
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
duiba-egret-games
Commits
e30ced12
Commit
e30ced12
authored
Nov 07, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2cc81e82
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
74 additions
and
14 deletions
+74
-14
index.html
egret/index.html
+1
-0
Alert.ts
egret/libs/new_wx/components/Alert.ts
+1
-1
ComponentBase.ts
egret/libs/new_wx/components/ComponentBase.ts
+4
-1
HTMLRulePanel.ts
egret/libs/new_wx/components/HTMLRulePanel.ts
+1
-1
Loading.ts
egret/libs/new_wx/components/Loading.ts
+2
-1
OptionsPanel.ts
egret/libs/new_wx/components/OptionsPanel.ts
+1
-1
PlaySceneBase.ts
egret/libs/new_wx/components/PlaySceneBase.ts
+1
-1
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+1
-1
RankPanel.ts
egret/libs/new_wx/components/RankPanel.ts
+1
-1
RulePanel.ts
egret/libs/new_wx/components/RulePanel.ts
+1
-1
StartSceneBase.ts
egret/libs/new_wx/components/StartSceneBase.ts
+1
-1
loadAtlas.ts
egret/libs/new_wx/ctrls/loadAtlas.ts
+16
-0
panelCtrl.ts
egret/libs/new_wx/ctrls/panelCtrl.ts
+17
-3
sceneCtrl.ts
egret/libs/new_wx/ctrls/sceneCtrl.ts
+1
-0
loading.tmproject
egret/resource/TextureMerger/loading.tmproject
+1
-0
options.tmproject
egret/resource/TextureMerger/options.tmproject
+1
-0
bg.png
egret/resource/assets/loading/bg.png
+0
-0
progress.png
egret/resource/assets/loading/progress.png
+0
-0
default.res.json
egret/resource/default.res.json
+15
-1
default.thm.json
egret/resource/default.thm.json
+1
-0
LoadingSkin.exml
egret/resource/skins/LoadingSkin.exml
+7
-0
No files found.
egret/index.html
View file @
e30ced12
...
...
@@ -37,6 +37,7 @@
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script>
window
[
'development'
]
=
true
;
var
gameId
=
1
;
var
CFG
=
{
appInfo
:
{
...
...
egret/libs/new_wx/components/Alert.ts
View file @
e30ced12
...
...
@@ -6,7 +6,7 @@ export default class Alert extends Panel {
this
.
data
.
btnTxt
=
btnTxt
||
'确定'
;
}
protected
get
skinKey
()
{
return
'Alert'
}
get
skinKey
()
{
return
'Alert'
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
...
...
egret/libs/new_wx/components/ComponentBase.ts
View file @
e30ced12
...
...
@@ -4,6 +4,9 @@ export default class ComponentBase extends eui.Component {
constructor
()
{
super
();
this
.
data
=
{};
}
loadSkin
()
{
this
.
skinName
=
getSkinPath
(
this
.
skinKey
);
if
(
this
.
skin
)
{
this
.
onSkinComplete
();
...
...
@@ -20,7 +23,7 @@ export default class ComponentBase extends eui.Component {
}
protected
get
skinKey
()
{
return
null
}
get
skinKey
():
string
{
return
null
}
protected
onSkinComplete
()
{
this
.
initEvents
();
...
...
egret/libs/new_wx/components/HTMLRulePanel.ts
View file @
e30ced12
...
...
@@ -53,5 +53,5 @@ export default class HTMLRulePanel extends Panel {
}
}
protected
get
skinKey
()
{
return
'Rule'
}
get
skinKey
()
{
return
'Rule'
}
}
\ No newline at end of file
egret/libs/new_wx/components/Loading.ts
View file @
e30ced12
...
...
@@ -10,6 +10,7 @@ export default class Loading extends ComponentBase {
super
();
this
.
horizontalCenter
=
0
;
this
.
verticalCenter
=
0
;
this
.
loadSkin
();
}
show
()
{
...
...
@@ -38,5 +39,5 @@ export default class Loading extends ComponentBase {
this
.
data
.
speed
+=
5
;
}
protected
get
skinKey
()
{
return
'Loading'
}
get
skinKey
()
{
return
'Loading'
}
}
egret/libs/new_wx/components/OptionsPanel.ts
View file @
e30ced12
...
...
@@ -33,5 +33,5 @@ export default class OptionsPanel extends Panel {
return
`第
${
data
[
'scopeOrigin'
]}
名`
;
}
protected
get
skinKey
()
{
return
'Options'
}
get
skinKey
()
{
return
'Options'
}
}
\ No newline at end of file
egret/libs/new_wx/components/PlaySceneBase.ts
View file @
e30ced12
...
...
@@ -18,5 +18,5 @@ export default class PlaySceneBase extends Scene {
},
this
.
score
)
}
protected
get
skinKey
()
{
return
'Play'
}
get
skinKey
()
{
return
'Play'
}
}
\ No newline at end of file
egret/libs/new_wx/components/PrizePanel.ts
View file @
e30ced12
...
...
@@ -53,7 +53,7 @@ export default class PrizePanel extends Panel {
img
:
eui
.
Image
;
useBtn
:
eui
.
Button
;
protected
get
skinKey
()
{
return
'Prize'
}
get
skinKey
()
{
return
'Prize'
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
...
...
egret/libs/new_wx/components/RankPanel.ts
View file @
e30ced12
...
...
@@ -91,5 +91,5 @@ export default class RankPanel extends Panel {
}
protected
get
skinKey
()
{
return
'Rank'
}
get
skinKey
()
{
return
'Rank'
}
}
\ No newline at end of file
egret/libs/new_wx/components/RulePanel.ts
View file @
e30ced12
...
...
@@ -21,5 +21,5 @@ export default class RulePanel extends Panel {
this
.
labContent
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
DataManager
.
ins
.
getRuleData
.
ruleText
);
}
protected
get
skinKey
()
{
return
'Rule'
}
get
skinKey
()
{
return
'Rule'
}
}
\ No newline at end of file
egret/libs/new_wx/components/StartSceneBase.ts
View file @
e30ced12
...
...
@@ -93,5 +93,5 @@ export default class StartSceneBase extends Scene {
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
RANK_PANEL
);
}
protected
get
skinKey
()
{
return
'Start'
}
get
skinKey
()
{
return
'Start'
}
}
\ No newline at end of file
egret/libs/new_wx/ctrls/loadAtlas.ts
0 → 100644
View file @
e30ced12
const
loadAtlas
=
(
name
:
string
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
RES
.
getResByUrl
(
`resource/TextureMerger/
${
name
}
.json`
,
(
sheet
:
egret
.
SpriteSheet
)
=>
{
resolve
(
this
);
},
this
,
RES
.
ResourceItem
.
TYPE_SHEET
);
});
}
// const loadAtlas = (name: string) => {
// return new Promise((resolve, reject) => {
// RES.getResByUrl(`resource/TextureMerger/${name}.json`, (sheet: egret.SpriteSheet) => {
// resolve(this);
// }, this, RES.ResourceItem.TYPE_SHEET);
// });
// }
\ No newline at end of file
egret/libs/new_wx/ctrls/panelCtrl.ts
View file @
e30ced12
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
Panel
from
"../components/Panel"
;
import
Loading
from
"../components/Loading"
;
export
default
class
PanelCtrl
{
private
_parent
:
egret
.
Sprite
;
private
_mask
:
egret
.
Sprite
;
...
...
@@ -13,14 +14,27 @@ export default class PanelCtrl {
}
show
(
type
:
ModuleTypes
,
data
?)
{
this
.
addMask
();
const
cls
=
this
.
_panelClassMap
[
type
];
const
panel
:
Panel
=
new
cls
(
data
);
this
.
addMask
();
if
(
!
window
[
'development'
])
{
Loading
.
instace
.
show
();
RES
.
getResByUrl
(
`
${
panel
.
skinKey
.
toLowerCase
()}
_json`
,
(
sheet
:
egret
.
SpriteSheet
)
=>
{
Loading
.
instace
.
hide
();
this
.
showAfterLoadAtlas
(
panel
,
data
);
},
this
,
RES
.
ResourceItem
.
TYPE_SHEET
);
}
else
{
this
.
showAfterLoadAtlas
(
panel
,
data
);
}
return
panel
;
}
showAfterLoadAtlas
(
panel
:
Panel
,
data
)
{
panel
.
loadSkin
();
this
.
_current
=
panel
;
panel
.
start
(
data
);
this
.
add
(
panel
);
egret
.
Tween
.
get
(
panel
).
set
({
y
:
-
200
}).
to
({
y
:
0
},
500
,
egret
.
Ease
.
getBackOut
(
2
));
return
panel
;
}
addMask
()
{
...
...
@@ -31,7 +45,7 @@ export default class PanelCtrl {
this
.
_mask
.
graphics
.
drawRect
(
0
,
0
,
750
,
1624
);
this
.
_mask
.
graphics
.
endFill
();
}
this
.
_mask
.
alpha
=
1
;
this
.
_mask
.
alpha
=
1
;
this
.
_parent
.
addChild
(
this
.
_mask
);
}
removeMask
()
{
...
...
egret/libs/new_wx/ctrls/sceneCtrl.ts
View file @
e30ced12
...
...
@@ -19,6 +19,7 @@ export default class SceneCtrl {
}
const
cls
=
this
.
_sceneClassMap
[
type
];
const
scene
:
Scene
=
new
cls
();
scene
.
loadSkin
();
scene
.
start
();
this
.
addToStage
(
scene
);
}
...
...
egret/resource/TextureMerger/loading.tmproject
0 → 100644
View file @
e30ced12
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"loading","version":5,"files":["../assets/loading/bg.png","../assets/loading/progress.png"]}
\ No newline at end of file
egret/resource/TextureMerger/options.tmproject
0 → 100644
View file @
e30ced12
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"options","version":5,"files":["../assets/option/line2.png","../assets/option/prizeBg.png","../assets/option/X-1.png","../assets/option/line.png"]}
\ No newline at end of file
egret/resource/assets/loading/bg.png
0 → 100644
View file @
e30ced12
1.45 KB
egret/resource/assets/loading/progress.png
0 → 100644
View file @
e30ced12
1.3 KB
egret/resource/default.res.json
View file @
e30ced12
...
...
@@ -6,7 +6,7 @@
},
{
"keys"
:
"line2_png,prizeBg_png,X-1_png,line_png"
,
"name"
:
"option"
"name"
:
"option
s
"
},
{
"keys"
:
"alertbg_png"
,
...
...
@@ -27,6 +27,10 @@
{
"keys"
:
"X_png,ruleBg_png"
,
"name"
:
"rule"
},
{
"keys"
:
"bg_png,progress_png"
,
"name"
:
"loading"
}
],
"resources"
:
[
...
...
@@ -209,6 +213,16 @@
"url"
:
"assets/playscene/testbtn.png"
,
"type"
:
"image"
,
"name"
:
"testbtn_png"
},
{
"url"
:
"assets/loading/bg.png"
,
"type"
:
"image"
,
"name"
:
"bg_png"
},
{
"url"
:
"assets/loading/progress.png"
,
"type"
:
"image"
,
"name"
:
"progress_png"
}
]
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
e30ced12
...
...
@@ -3,6 +3,7 @@
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/AlertSkin.exml"
,
"resource/skins/LoadingSkin.exml"
,
"resource/skins/OptionItemSkin.exml"
,
"resource/skins/OptionsSkin.exml"
,
"resource/skins/PlaySkin.exml"
,
...
...
egret/resource/skins/LoadingSkin.exml
0 → 100644
View file @
e30ced12
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"loadingSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
xmlns:tween=
"egret.tween.*"
>
<w:Declarations>
</w:Declarations>
<e:Image
y=
"288"
source=
"bg_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"waitImg"
source=
"progress_png"
y=
"380"
anchorOffsetX=
"28"
anchorOffsetY=
"28"
horizontalCenter=
"0"
rotation=
"{data.speed}"
/>
</e:Skin>
\ 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