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
bacfa764
Commit
bacfa764
authored
Aug 18, 2021
by
Joker Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bounceFall1.0' of
http://gitlab2.dui88.com/clq/db-game-template
into bounceFall1.0
parents
8263da56
be9abfb0
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
194 additions
and
197 deletions
+194
-197
settings.json
.vscode/settings.json
+4
-0
MainBase.ts
egret/libs/new_wx/MainBase.ts
+3
-2
PlaySceneBase.ts
egret/libs/new_wx/components/PlaySceneBase.ts
+9
-8
StartSceneBase.ts
egret/libs/new_wx/components/StartSceneBase.ts
+2
-13
DataManager.ts
egret/libs/tw/manager/DataManager.ts
+2
-1
publish.js
egret/publish.js
+6
-6
startscenebg.jpg
egret/resource/assets/startScene/startscenebg.jpg
+0
-0
default.res.json
egret/resource/default.res.json
+3
-10
StartSkin.exml
egret/resource/skins/StartSkin.exml
+0
-1
Game.ts
egret/src/playScene/Game/Game.ts
+165
-156
No files found.
.vscode/settings.json
0 → 100644
View file @
bacfa764
{
"editor.snippetSuggestions"
:
"bottom"
,
"editor.suggest.snippetsPreventQuickSuggestions"
:
false
}
\ No newline at end of file
egret/libs/new_wx/MainBase.ts
View file @
bacfa764
...
...
@@ -27,6 +27,7 @@ export default class MainBase extends eui.UILayer {
Loading
.
instace
.
loadImage
();
console
.
log
(
window
[
'CFG'
])
DataManager
.
ins
.
gameCfgData
=
window
[
'CFG'
];
DataManager
.
ins
.
gameCfgData
.
gameInfo
=
{}
DataManager
.
ins
.
gameCfgData
.
gameInfo
.
gameId
=
window
[
"gameId"
];
this
.
getData
();
}
...
...
@@ -63,7 +64,7 @@ export default class MainBase extends eui.UILayer {
}
protected
getData
()
{
NetManager
.
ins
.
getInfo
();
//
NetManager.ins.getInfo();
}
protected
createChildren
():
void
{
...
...
@@ -161,7 +162,7 @@ export default class MainBase extends eui.UILayer {
}
private
loadTheme
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
// load skin theme configuration file, you can manually modify the file. And replace the default skin.
//加载皮肤主题配置文件,可以手动修改这个文件。替换默认皮肤。
const
theme
=
new
eui
.
Theme
(
"resource/default.thm.json"
,
this
.
stage
);
...
...
egret/libs/new_wx/components/PlaySceneBase.ts
View file @
bacfa764
...
...
@@ -13,15 +13,16 @@ export default class PlaySceneBase extends Scene {
}
sendSubmit
()
{
submit
(()
=>
{
let
panel
:
Panel
;
if
(
DataManager
.
ins
.
gameGetSubmitResultData
.
lottery
)
{
panel
=
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PRIZE_PANEL
)
}
else
{
panel
=
showAlertPanel
(
'手气不佳
\
n 再试一次吧~'
);
}
let
panel
=
showAlertPanel
(
" 手气不佳
\n
再试一次吧~"
);
// submit(() => {
// let panel: Panel;
// if (DataManager.ins.gameGetSubmitResultData.lottery) {
// panel = PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL)
// } else {
// panel = showAlertPanel('手气不佳 \n 再试一次吧~');
// }
},
this
.
score
)
//
}, this.score)
}
get
skinKey
()
{
return
'Play'
}
}
\ No newline at end of file
egret/libs/new_wx/components/StartSceneBase.ts
View file @
bacfa764
...
...
@@ -79,28 +79,17 @@ export default class StartSceneBase extends Scene {
}
private
updateGetInfoView
()
{
if
(
DataManager
.
ins
.
getInfoData
)
{
this
.
updateStartBtnStatus
();
this
.
updateCountTxt
();
}
else
{
DataManager
.
ins
.
once
(
'dataUpdate'
,
this
.
updateGetInfoView
,
this
);
}
this
.
updateStartBtnStatus
();
}
async
updateStartBtnStatus
()
{
if
(
this
.
startBtn
)
{
this
.
startBtn
.
visible
=
true
;
this
.
startBtn
.
enabled
=
getStartBtnEnable
();
this
.
startBtn
.
enabled
=
true
}
}
updateCountTxt
()
{
if
(
this
.
countTxt
)
{
this
.
countTxt
.
text
=
getCountTxt
();
}
}
updateExemptionTxt
()
{
if
(
this
.
exemptionTxt
)
{
...
...
egret/libs/tw/manager/DataManager.ts
View file @
bacfa764
...
...
@@ -69,6 +69,7 @@ import { ICustomCfgData } from '../data/custom/cfg/ICustomCfgData';
*/
export
class
DataManager
extends
ABDataManager
{
private
static
instance
:
DataManager
;
static
DataManager
:
any
;
public
static
get
ins
():
DataManager
{
if
(
!
this
.
instance
)
{
...
...
@@ -89,7 +90,7 @@ export class DataManager extends ABDataManager {
/**
* 游戏业务
*/
public
gameCfgData
:
IGameCfgData
;
public
gameCfgData
:
any
;
/**
* 自定义活动工具业务
...
...
egret/publish.js
View file @
bacfa764
...
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var
_this
=
this
;
this
.
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI
dGi1IOap7fkF
'
,
accessKeySecret
:
'
SKrOOp6EVtDGEV47yn0t2h97gyNioQ
'
,
accessKeyId
:
'LTAI
4Fw25WcfcGv7FvcHoiHK
'
,
accessKeySecret
:
'
NZk1NtT9J5HFaAolNbtQdzTzLLvLYm
'
,
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
});
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
...
...
@@ -57,8 +57,8 @@ class TuiaAutoUpload {
var
filedir
=
path
.
join
(
filePath
,
filename
);
//根据文件路径获取文件信息,返回一个fs.Stats对象
var
stats
=
fs
.
statSync
(
filedir
);
var
isFile
=
stats
.
isFile
();
//是文件
var
isDir
=
stats
.
isDirectory
();
//是文件夹
var
isFile
=
stats
.
isFile
();
//是文件
var
isDir
=
stats
.
isDirectory
();
//是文件夹
if
(
isFile
)
{
var
sep
=
'/'
;
if
(
'win32'
==
process
.
platform
)
...
...
@@ -68,7 +68,7 @@ class TuiaAutoUpload {
_this._files.push(newDirArr.join('
/
'));
}
if (isDir) {
fileDisplay(filedir);//递归,如果是文件夹,就继续遍历该文件夹下面的文件
fileDisplay(filedir);
//递归,如果是文件夹,就继续遍历该文件夹下面的文件
}
});
...
...
@@ -146,4 +146,4 @@ const autoupload = new TuiaAutoUpload({
originDir: `/db_games/${config.type}/${config.name}/${version}/`
}, "prod")
autoupload.start()
autoupload.start()
\ No newline at end of file
egret/resource/assets/startScene/startscenebg.jpg
deleted
100644 → 0
View file @
8263da56
41.5 KB
egret/resource/default.res.json
View file @
bacfa764
{
"groups"
:
[
{
"keys"
:
"start_btn_png,start_btn_gray_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,e4_png,e3_png,e2_png,e1_png,文案_png,startscenebg_jpg"
,
"groups"
:
[{
"keys"
:
"start_btn_png,start_btn_gray_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,e4_png,e3_png,e2_png,e1_png,文案_png"
,
"name"
:
"start"
},
{
...
...
@@ -37,8 +36,7 @@
"name"
:
"noprize"
}
],
"resources"
:
[
{
"resources"
:
[{
"url"
:
"assets/alert/alertbg.png"
,
"type"
:
"image"
,
"name"
:
"alertbg_png"
...
...
@@ -218,11 +216,6 @@
"type"
:
"image"
,
"name"
:
"gameOverTitle_png"
},
{
"url"
:
"assets/startscenebg.jpg"
,
"type"
:
"image"
,
"name"
:
"startscenebg_jpg"
},
{
"url"
:
"assets/playscenebg.jpg"
,
"type"
:
"image"
,
...
...
egret/resource/skins/StartSkin.exml
View file @
bacfa764
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"StartSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16705cb4eec"
/>
<e:Image
id=
"bg"
bottom=
"0"
horizontalCenter=
"0"
source=
"startscenebg_jpg"
/>
<e:Group
id=
"elements"
horizontalCenter=
"0"
verticalCenter=
"-172"
height=
"664"
width=
"756"
>
<e:Image
id=
"e1"
source=
"e1_png"
x=
"154.5"
y=
"124"
anchorOffsetX=
"38"
anchorOffsetY=
"35.5"
/>
<e:Image
id=
"e2"
source=
"e2_png"
x=
"756"
y=
"531.5"
anchorOffsetX=
"122"
anchorOffsetY=
"131.5"
/>
...
...
egret/src/playScene/Game/Game.ts
View file @
bacfa764
This diff is collapsed.
Click to expand it.
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