Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DuibaGameTemplate
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
钱根
DuibaGameTemplate
Commits
b525a596
Commit
b525a596
authored
Dec 20, 2021
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开始游戏逻辑调整
parent
88dfd6e5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
9 deletions
+29
-9
checkGameNum.json
mock/miniTb/snow/checkGameNum.json
+3
-0
doIndex.json
mock/miniTb/snow/doIndex.json
+1
-1
ResJson.ts
src/ResJson.ts
+1
-1
TaoBaoNet.ts
src/TaoBaoNet.ts
+2
-1
GameScene.ts
src/scenes/GameScene/GameScene.ts
+5
-0
IndexScene.ts
src/scenes/IndexScene.ts
+17
-6
No files found.
mock/miniTb/snow/checkGameNum.json
0 → 100644
View file @
b525a596
{
"success"
:
true
}
\ No newline at end of file
mock/miniTb/snow/doIndex.json
View file @
b525a596
...
@@ -14,6 +14,6 @@
...
@@ -14,6 +14,6 @@
"rewardCredits"
:
10
"rewardCredits"
:
10
}
}
],
],
"skiingGuideFlag"
:
1
"skiingGuideFlag"
:
0
}
}
}
}
\ No newline at end of file
src/ResJson.ts
View file @
b525a596
...
@@ -656,5 +656,5 @@ export const ResJson = {
...
@@ -656,5 +656,5 @@ export const ResJson = {
"name"
:
"svga"
"name"
:
"svga"
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1639
627848
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/1639
994156
/resource/"
}
}
\ No newline at end of file
src/TaoBaoNet.ts
View file @
b525a596
...
@@ -118,7 +118,8 @@ export enum TbNetName {
...
@@ -118,7 +118,8 @@ export enum TbNetName {
showRuleModal
=
'mine.showRuleModal'
,
showRuleModal
=
'mine.showRuleModal'
,
back
=
'mine.back'
,
back
=
'mine.back'
,
indexSceneVisible
=
"mine.indexSceneVisible"
,
indexSceneVisible
=
"mine.indexSceneVisible"
,
turnBgm
=
'mine.turnBgm'
turnBgm
=
'mine.turnBgm'
,
checkGameNum
=
'snow.checkGameNum'
}
}
export
enum
TBBgm
{
export
enum
TBBgm
{
...
...
src/scenes/GameScene/GameScene.ts
View file @
b525a596
...
@@ -276,6 +276,11 @@ export class GameScene extends Scene {
...
@@ -276,6 +276,11 @@ export class GameScene extends Scene {
await
sendTbNet
(
TbNetName
.
doModifySkiingGuideFlag
,
{
await
sendTbNet
(
TbNetName
.
doModifySkiingGuideFlag
,
{
flag
:
1
flag
:
1
})
})
const
{
success
,
data
}
=
await
sendTbNet
(
TbNetName
.
doStart
)
if
(
!
success
)
{
changeScene
(
IndexScene
)
return
}
this
.
RabbitCont
.
visible
=
true
this
.
RabbitCont
.
visible
=
true
this
.
onStart
()
this
.
onStart
()
}))
}))
...
...
src/scenes/IndexScene.ts
View file @
b525a596
import
{
showToast
}
from
'./../../module/ctrls/toastCtrl'
;
import
{
changeScene
}
from
'./../../module/ctrls/index'
;
import
{
changeScene
}
from
'./../../module/ctrls/index'
;
import
{
layers
}
from
'./../../module/views/layers'
;
import
{
layers
}
from
'./../../module/views/layers'
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
...
@@ -73,15 +74,25 @@ export default class IndexScene extends Scene {
...
@@ -73,15 +74,25 @@ export default class IndexScene extends Scene {
}
}
async
onGameStart
()
{
async
onGameStart
()
{
const
{
success
,
data
}
=
await
sendTbNet
(
TbNetName
.
doStart
)
const
{
success
:
s
}
=
await
sendTbNet
(
TbNetName
.
checkGameNum
)
if
(
success
)
{
if
(
!
s
)
{
sendTbNet
(
TbNetName
.
indexSceneVisible
,
{
visible
:
false
})
showToast
(
'游戏次数不足'
)
return
}
sendTbNet
(
TbNetName
.
indexSceneVisible
,
{
visible
:
false
})
if
(
this
.
indexSceneData
.
skiingGuideFlag
==
0
)
{
changeScene
(
GameScene
,
{
changeScene
(
GameScene
,
{
isNewGuy
:
!
this
.
indexSceneData
.
skiingGuideFlag
,
isNewGuy
:
true
haveRadish
:
data
.
haveRadish
})
})
}
else
{
const
{
success
,
data
}
=
await
sendTbNet
(
TbNetName
.
doStart
)
if
(
success
)
{
changeScene
(
GameScene
,
{
isNewGuy
:
false
,
haveRadish
:
data
.
haveRadish
})
}
}
}
}
}
onRuleShowPanel
()
{
onRuleShowPanel
()
{
...
...
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