Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
SparkProjects
MingSnake_241120
Commits
67a15cb4
Commit
67a15cb4
authored
Dec 03, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
588d74d7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
21 deletions
+31
-21
gameFail.png
assets/Bundles/GameFailPanel/png/gameFail.png
+0
-0
gameFail.png.meta
assets/Bundles/GameFailPanel/png/gameFail.png.meta
+10
-10
GameFailPanel.ts
assets/Scripts/Panels/GameFailPanel.ts
+4
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+5
-5
gameStore.ts
assets/Scripts/store/gameStore.ts
+10
-4
startGame.do.json
preview-template/mock/game/startGame.do.json
+1
-1
startGame数据生成.mjs
preview-template/mock/game/startGame数据生成.mjs
+1
-1
No files found.
assets/Bundles/GameFailPanel/png/gameFail.png
View replaced file @
588d74d7
View file @
67a15cb4
42 KB
|
W:
|
H:
43.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/Bundles/GameFailPanel/png/gameFail.png.meta
View file @
67a15cb4
...
@@ -45,11 +45,11 @@
...
@@ -45,11 +45,11 @@
"offsetX": 0,
"offsetX": 0,
"offsetY": 0,
"offsetY": 0,
"trimX": 0,
"trimX": 0,
"trimY": 0,
"trimY":
3
0,
"width": 1620,
"width": 1620,
"height": 450,
"height": 450,
"rawWidth": 1620,
"rawWidth": 1620,
"rawHeight":
45
0,
"rawHeight":
51
0,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft": 0,
...
@@ -84,23 +84,23 @@
...
@@ -84,23 +84,23 @@
],
],
"uv": [
"uv": [
0,
0,
4
5
0,
4
8
0,
1620,
1620,
450,
480,
0,
0,
0,
30,
1620,
1620,
0
3
0
],
],
"nuv": [
"nuv": [
0,
0,
0,
0
.058823529411764705
,
1,
1,
0.058823529411764705,
0,
0,
0,
0.9411764705882353,
1,
1,
1,
1
0.9411764705882353
],
],
"minPos": [
"minPos": [
-810,
-810,
...
...
assets/Scripts/Panels/GameFailPanel.ts
View file @
67a15cb4
import
Panel
from
"../../Module/Panel"
;
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Button
,
Label
,
Node
,
Sprite
}
from
"cc"
;
import
{
_decorator
,
Button
,
Label
,
Node
,
Sprite
}
from
"cc"
;
import
{
observer
}
from
"../store/decorators"
;
import
{
observer
}
from
"../store/decorators"
;
import
{
changeScene
}
from
"../../Module/UIFast"
;
import
{
HomeScene
}
from
"../Scenes/HomeScene"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -21,6 +23,8 @@ export default class GameFailPanel extends Panel {
...
@@ -21,6 +23,8 @@ export default class GameFailPanel extends Panel {
}
}
clickBack
()
{
clickBack
()
{
this
.
hidePanel
();
changeScene
(
HomeScene
);
}
}
// @render
// @render
...
...
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
67a15cb4
...
@@ -14,7 +14,6 @@ import { Global, SkinName } from "./Global";
...
@@ -14,7 +14,6 @@ import { Global, SkinName } from "./Global";
import
{
Events
,
GameState
}
from
"./Common/Enums"
;
import
{
Events
,
GameState
}
from
"./Common/Enums"
;
import
{
changeScene
,
showPanel
,
showToast
}
from
"../../../Module/UIFast"
;
import
{
changeScene
,
showPanel
,
showToast
}
from
"../../../Module/UIFast"
;
import
Scene
from
"../../../Module/Scene"
;
import
Scene
from
"../../../Module/Scene"
;
import
{
executePreFrame
,
getItemGenerator
}
from
"../../Utils/ExecutePreFrame"
;
import
{
Player
}
from
"./Player"
;
import
{
Player
}
from
"./Player"
;
import
{
AISnake
}
from
"./AISnake"
;
import
{
AISnake
}
from
"./AISnake"
;
import
{
aiPool
,
clearAllPool
}
from
"./Manager/CommonPool"
;
import
{
aiPool
,
clearAllPool
}
from
"./Manager/CommonPool"
;
...
@@ -110,7 +109,7 @@ export class MainGame extends Scene {
...
@@ -110,7 +109,7 @@ export class MainGame extends Scene {
}
else
if
(
currentStage
==
2
)
{
}
else
if
(
currentStage
==
2
)
{
}
else
{
}
else
{
this
.
gameOver
();
await
this
.
gameOver
();
}
}
...
@@ -124,7 +123,7 @@ export class MainGame extends Scene {
...
@@ -124,7 +123,7 @@ export class MainGame extends Scene {
const
{
currentStage
}
=
gameStore
.
startInfo
;
const
{
currentStage
}
=
gameStore
.
startInfo
;
if
(
currentStage
==
1
)
{
if
(
currentStage
==
1
)
{
const
submitSuc
=
await
gameStore
.
submitOne
(
this
.
player
.
length
);
const
submitSuc
=
await
gameStore
.
submitOne
();
const
gameSuc
=
await
gameStore
.
startGame
();
const
gameSuc
=
await
gameStore
.
startGame
();
if
(
gameSuc
)
{
if
(
gameSuc
)
{
// await changeScene(GameLoading, {
// await changeScene(GameLoading, {
...
@@ -139,8 +138,9 @@ export class MainGame extends Scene {
...
@@ -139,8 +138,9 @@ export class MainGame extends Scene {
}
}
};
};
d
gameOver
()
{
async
gameOver
()
{
const
success
=
await
gameStore
.
finalSubmit
();
}
}
...
...
assets/Scripts/store/gameStore.ts
View file @
67a15cb4
...
@@ -60,7 +60,9 @@ class GameStore {
...
@@ -60,7 +60,9 @@ class GameStore {
return
success
;
return
success
;
}
}
async
submitOne
(
score
:
number
)
{
async
submitOne
()
{
const
{
length
:
score
,
killNum
}
=
this
.
gameInfo
;
const
params
=
{
const
params
=
{
startId
:
this
.
startInfo
.
startId
,
startId
:
this
.
startInfo
.
startId
,
score
,
score
,
...
@@ -77,7 +79,9 @@ class GameStore {
...
@@ -77,7 +79,9 @@ class GameStore {
return
success
;
return
success
;
}
}
async
submitTwo
(
score
:
number
)
{
async
submitTwo
()
{
const
{
length
:
score
,
killNum
}
=
this
.
gameInfo
;
const
params
=
{
const
params
=
{
startId
:
this
.
startInfo
.
startId
,
startId
:
this
.
startInfo
.
startId
,
score
,
score
,
...
@@ -94,12 +98,14 @@ class GameStore {
...
@@ -94,12 +98,14 @@ class GameStore {
return
success
;
return
success
;
}
}
async
finalSubmit
(
score
:
number
,
finalKill
:
number
)
{
async
finalSubmit
()
{
const
{
length
:
score
,
killNum
}
=
this
.
gameInfo
;
const
param
:
any
=
{
const
param
:
any
=
{
startId
:
this
.
startInfo
.
startId
,
startId
:
this
.
startInfo
.
startId
,
score
,
score
,
finalKill
,
finalKill
:
killNum
,
composeSpList
:
[],
composeSpList
:
[],
};
};
...
...
preview-template/mock/game/startGame.do.json
View file @
67a15cb4
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
"success"
:
true
,
"success"
:
true
,
"code"
:
""
,
"code"
:
""
,
"message"
:
""
,
"message"
:
""
,
"data"
:
"Dn22D8mkVmDOfP4ajNWcqtUT2BWK7hLAEHSofRAnITI23/h6M5dk9MJ+cY56DvHjlsXFGC8q3BgSsz56SCAcO6LiZx8tbmrjStn4UcGZq6/W+ZIm0IEma+v0iYkjGBT6bqBnMhA+9JKPvWXKnFJiNR2b8kEDC1Mjt2MH2penAaujIPcM6SAvaaZuTB04+Jtk
g598ulZEVdSadszHW0WSzCDjzyl9pUo3ai58aja/O6OPNCmasxQ2HN3MhUZceEZHYRQUj2wA4OgIbGAl86/PLgcfqBnXV2NFox1DfZ4aKKTJxlYOJCrfKM2nx8RaONLCeCqVn3U1bzFqJ1Upn8vKObxrVTSrMYASXNC27cTuH9bGK3lkY+rfXa0jRKAuxSnQRC0SkOJyFz+ZuXZxqKGVhPG5Pnh3iLaYvhyTvYuLynmU7PO4shaMtAaGi6nOlRz0Rd1agq4+8RfQW6PUkemr0Zn2pR4otRBTZw6odXswdwp1mZgl82nZzIwi5NiXaKTCzMDTfBVaeczzUpZLnXt/rPBh4Zn4qyzhNVLBq5/dbt6Minb+7gbX3xMYqpSUiiZD0zfGA25L+dGBa5EjC0/Pkac4Q1mUiVY6CkmqqbRVVC/pxBYdTd7O/xfwfSz5GLrDePkIIE/IsMYx5ovf9DueV
Q=="
"data"
:
"Dn22D8mkVmDOfP4ajNWcqtUT2BWK7hLAEHSofRAnITI23/h6M5dk9MJ+cY56DvHjlsXFGC8q3BgSsz56SCAcO6LiZx8tbmrjStn4UcGZq6/W+ZIm0IEma+v0iYkjGBT6bqBnMhA+9JKPvWXKnFJiNR2b8kEDC1Mjt2MH2penAaujIPcM6SAvaaZuTB04+Jtk
5VSYZXauvq4KmXW3GGRumeiiyEIA+ZXAopsUzjcknsRY6nZmKVj0NjiFtVGF84qiZnISqNrmwNrdHOQONlI0TLVPx0Bzlpich1zyMUMMkZ/7cV2CeMi6Sm84oR/risQdMtm7d9EPsIDnoL6i0TO+JLCfvbc2r4yxr3qVSjSnK8A2DqxrtTBtXV8BLNwPLVjtZLVP0MnLPT6PXS5TNsD/jRswCJPga523j5LQgkXjJLlRl83WRQ8/SrcECSAoTF0gHG0+rm8WuFVrvQadxzK8kWZertwqJhAKkAlaj5rOJIgfS7rfoxrqPFSG7JvnMFNyCJ5Z8e4SSC6R/G8pBB1js45fXO6HvLg1QrYCZp+yxNAhcvDgXSPMIHVQns9RFNrw5cC0a4gSW8qIqzNbbl12pfq/OYvV0TjVFIZuGGYAlDrmSifBtQbh3yuT4pd6NH/inb/RXr6U3M6zCet4l0foa
Q=="
}
}
\ No newline at end of file
preview-template/mock/game/startGame数据生成.mjs
View file @
67a15cb4
...
@@ -52,7 +52,7 @@ const startInfo = {
...
@@ -52,7 +52,7 @@ const startInfo = {
limitLuckNum
:
5
,
// 当日上限可获得福袋数
limitLuckNum
:
5
,
// 当日上限可获得福袋数
downArea
:
[
3
,
2
,
1
],
// 掉落分布,集合,比如每日上限6个,这里配置返回1、2、3
downArea
:
[
3
,
2
,
1
],
// 掉落分布,集合,比如每日上限6个,这里配置返回1、2、3
currentAcquireNum
:
3
,
// 当局剩余可获得福袋数,不包含accumulateLuckNum,当局累计获得福袋数量
currentAcquireNum
:
3
,
// 当局剩余可获得福袋数,不包含accumulateLuckNum,当局累计获得福袋数量
currentStage
:
1
,
// 当前应该进入的阶段(1-一阶段 2-二阶段 3-无尽模式)
currentStage
:
3
,
// 当前应该进入的阶段(1-一阶段 2-二阶段 3-无尽模式)
spCardList
:
[
// 道具卡集合
spCardList
:
[
// 道具卡集合
{
spId
:
"sp_bag_silver"
,
num
:
1
},
{
spId
:
"sp_bag_silver"
,
num
:
1
},
{
spId
:
"sp_revival_card"
,
num
:
2
},
{
spId
:
"sp_revival_card"
,
num
:
2
},
...
...
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