Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
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
TNGD_CaveCruiser
Commits
6ed60f3e
Commit
6ed60f3e
authored
Aug 09, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理代码1
parent
e4e96666
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
9222 additions
and
156 deletions
+9222
-156
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+257
-152
GameMgr.ts
assets/Scripts/GameMgr.ts
+9
-0
MergeMaxPanel.ts
assets/Scripts/Panels/MergeMaxPanel.ts
+41
-0
MergeMaxPanel.ts.meta
assets/Scripts/Panels/MergeMaxPanel.ts.meta
+1
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+18
-3
MergeMaxPanel.meta
assets/resources/MergeMaxPanel.meta
+1
-0
MergeMaxPanel.prefab
assets/resources/MergeMaxPanel/MergeMaxPanel.prefab
+8600
-0
MergeMaxPanel.prefab.meta
assets/resources/MergeMaxPanel/MergeMaxPanel.prefab.meta
+13
-0
heijiao.svga
assets/resources/MergeMaxPanel/heijiao.svga
+0
-0
heijiao.svga.meta
assets/resources/MergeMaxPanel/heijiao.svga.meta
+12
-0
img.meta
assets/resources/MergeMaxPanel/img.meta
+1
-0
bg.png
assets/resources/MergeMaxPanel/img/bg.png
+0
-0
bg.png.meta
assets/resources/MergeMaxPanel/img/bg.png.meta
+134
-0
返回主页.png
assets/resources/MergeMaxPanel/img/返回主页.png
+0
-0
返回主页.png.meta
assets/resources/MergeMaxPanel/img/返回主页.png.meta
+134
-0
start.do.json
preview-template/mock/game/start.do.json
+1
-1
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
6ed60f3e
This diff is collapsed.
Click to expand it.
assets/Scripts/GameMgr.ts
View file @
6ed60f3e
...
...
@@ -3,6 +3,15 @@ import { changeScene, hideWaiting, showWaiting } from "db://assets/Module/UIFast
import
{
HomeScene
}
from
"./Scenes/HomeScene"
;
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Utils/Crypto"
;
const
en
=
AESEncrypt
(
JSON
.
stringify
({
recordId
:
232323
,
oneGameHammerQuantity
:
99
,
oneGameProteanQuantity
:
99
,
}),
"FDF817451A60EB8F"
,
"cDOiBC1n2QrkAY2P"
);
console
.
log
(
en
);
export
default
class
GameMgr
{
private
static
_ins
:
GameMgr
=
null
;
...
...
assets/Scripts/Panels/MergeMaxPanel.ts
0 → 100644
View file @
6ed60f3e
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Node
}
from
"cc"
;
import
Svga
from
"../../Component/Svga/Svga"
;
import
GameMgr
from
"../GameMgr"
;
const
{
ccclass
,
property
}
=
_decorator
;
@
ccclass
(
'MergeMaxPanel'
)
export
default
class
MergeMaxPanel
extends
Panel
{
static
bundle
:
string
=
""
;
static
skin
=
"MergeMaxPanel"
;
static
group
=
"MergeMaxPanel"
;
@
property
(
Node
)
svga
:
Node
=
null
;
submitPromise
=
null
;
async
start
()
{
this
.
svga
.
on
(
Svga
.
EventType
.
END_FRAME
,
this
.
svgaEnd
,
this
);
this
.
submitPromise
=
GameMgr
.
ins
.
submit
(
true
,
this
.
data
.
useHammerQuantity
,
this
.
data
.
useProteanQuantity
);
}
svgaEnd
=
async
()
=>
{
const
{
success
,
data
}
=
await
this
.
submitPromise
;
if
(
!
success
)
{
return
;
}
this
.
hidePanel
();
}
}
assets/Scripts/Panels/MergeMaxPanel.ts.meta
0 → 100644
View file @
6ed60f3e
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"cb0c3ede-2f8c-410f-882a-ffbbebc35e02","files":[],"subMetas":{},"userData":{}}
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
6ed60f3e
...
...
@@ -7,9 +7,10 @@ import {
}
from
"cc"
;
import
Scene
from
"db://assets/Module/Scene"
;
import
{
Ball
}
from
"./Ball"
;
import
{
changeScene
,
showToast
}
from
"../../../Module/UIFast"
;
import
{
changeScene
,
show
Panel
,
show
Toast
}
from
"../../../Module/UIFast"
;
import
{
HomeScene
}
from
"../HomeScene"
;
import
GameMgr
from
"../../GameMgr"
;
import
MergeMaxPanel
from
"../../Panels/MergeMaxPanel"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -30,6 +31,7 @@ export class MainGame extends Scene {
@
property
({
type
:
Node
,
displayName
:
"线"
})
line
:
Node
=
null
;
@
property
(
Prefab
)
proteanPrefab
:
Prefab
=
null
;
@
property
(
Node
)
readyRoot
:
Node
=
null
;
@
property
(
Node
)
ballRoot
:
Node
=
null
;
@
property
({
type
:
[
Prefab
]})
ballPrefab
:
Prefab
[]
=
[];
...
...
@@ -107,6 +109,9 @@ export class MainGame extends Scene {
}
/**
* 游戏结束
*/
gameOver
=
(
suc
)
=>
{
if
(
this
.
isOver
)
return
;
...
...
@@ -114,6 +119,15 @@ export class MainGame extends Scene {
this
.
isOver
=
true
;
PhysicsSystem2D
.
instance
.
enable
=
false
;
if
(
suc
)
{
const
{
oneGameHammerQuantity
,
oneGameProteanQuantity
}
=
GameMgr
.
ins
.
gameInfo
;
showPanel
(
MergeMaxPanel
,
{
useHammerQuantity
:
oneGameHammerQuantity
-
this
.
hammerCount
,
useProteanQuantity
:
oneGameProteanQuantity
-
this
.
proteanCount
});
}
else
{
}
}
...
...
@@ -142,7 +156,7 @@ export class MainGame extends Scene {
this
.
proteanCount
--
;
this
.
ballRoot
.
removeChild
(
this
.
newBall
);
this
.
readyRoot
.
removeAllChildren
(
);
this
.
newBall
=
null
;
const
ball
=
instantiate
(
this
.
proteanPrefab
);
...
...
@@ -167,7 +181,7 @@ export class MainGame extends Scene {
private
showNewBall
(
ball
:
Node
)
{
ball
.
setPosition
(
0
,
InitY
);
ball
.
setScale
(
0
,
0
);
this
.
ball
Root
.
addChild
(
ball
);
this
.
ready
Root
.
addChild
(
ball
);
tween
(
ball
)
.
to
(
0.1
,
{
scale
:
v3
(
1
,
1
,
1
)})
.
call
(()
=>
{
...
...
@@ -395,6 +409,7 @@ export class MainGame extends Scene {
ballTs
.
sleep
=
false
;
ballTs
.
body
.
applyAngularImpulse
(
Math
.
random
()
*
30
-
15
,
true
);
this
.
ballRoot
.
addChild
(
this
.
newBall
);
this
.
newBall
=
null
;
this
.
readyDrop
=
false
;
...
...
assets/resources/MergeMaxPanel.meta
0 → 100644
View file @
6ed60f3e
{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"1fc0b54c-1f47-4b07-9fcc-7a2702c4cfa8","files":[],"subMetas":{},"userData":{}}
assets/resources/MergeMaxPanel/MergeMaxPanel.prefab
0 → 100644
View file @
6ed60f3e
This diff is collapsed.
Click to expand it.
assets/resources/MergeMaxPanel/MergeMaxPanel.prefab.meta
0 → 100644
View file @
6ed60f3e
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "955d8229-afe9-4d74-8e2c-428f69d05df3",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "MergeMaxPanel"
}
}
assets/resources/MergeMaxPanel/heijiao.svga
0 → 100644
View file @
6ed60f3e
File added
assets/resources/MergeMaxPanel/heijiao.svga.meta
0 → 100644
View file @
6ed60f3e
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "d4ddf6f8-85bb-4e3a-afae-44b9a4be9d08",
"files": [
".json",
".svga"
],
"subMetas": {},
"userData": {}
}
assets/resources/MergeMaxPanel/img.meta
0 → 100644
View file @
6ed60f3e
{"ver":"1.2.0","importer":"directory","imported":true,"uuid":"619816d6-a8a6-47c5-ae57-3efc325f2b86","files":[],"subMetas":{},"userData":{}}
assets/resources/MergeMaxPanel/img/bg.png
0 → 100644
View file @
6ed60f3e
102 KB
assets/resources/MergeMaxPanel/img/bg.png.meta
0 → 100644
View file @
6ed60f3e
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f3c753ca-4552-475b-a4b7-5eabc4188f40",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f3c753ca-4552-475b-a4b7-5eabc4188f40@6c48a",
"displayName": "bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f3c753ca-4552-475b-a4b7-5eabc4188f40",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "f3c753ca-4552-475b-a4b7-5eabc4188f40@f9941",
"displayName": "bg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 596,
"height": 519,
"rawWidth": 596,
"rawHeight": 519,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-298,
-259.5,
0,
298,
-259.5,
0,
-298,
259.5,
0,
298,
259.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
519,
596,
519,
0,
0,
596,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-298,
-259.5,
0
],
"maxPos": [
298,
259.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f3c753ca-4552-475b-a4b7-5eabc4188f40@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f3c753ca-4552-475b-a4b7-5eabc4188f40@6c48a"
}
}
assets/resources/MergeMaxPanel/img/返回主页.png
0 → 100644
View file @
6ed60f3e
42.3 KB
assets/resources/MergeMaxPanel/img/返回主页.png.meta
0 → 100644
View file @
6ed60f3e
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "7140ba1b-4683-45b6-a169-537fbd822737",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7140ba1b-4683-45b6-a169-537fbd822737@6c48a",
"displayName": "返回主页",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7140ba1b-4683-45b6-a169-537fbd822737",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "7140ba1b-4683-45b6-a169-537fbd822737@f9941",
"displayName": "返回主页",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 398,
"height": 155,
"rawWidth": 398,
"rawHeight": 155,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-199,
-77.5,
0,
199,
-77.5,
0,
-199,
77.5,
0,
199,
77.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
155,
398,
155,
0,
0,
398,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-199,
-77.5,
0
],
"maxPos": [
199,
77.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7140ba1b-4683-45b6-a169-537fbd822737@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "7140ba1b-4683-45b6-a169-537fbd822737@6c48a"
}
}
preview-template/mock/game/start.do.json
View file @
6ed60f3e
...
...
@@ -2,5 +2,5 @@
"success"
:
true
,
"code"
:
""
,
"message"
:
""
,
"data"
:
"
JQ6ychp7XaxltjGODs4zqEgoz4mc2NEsmpF7avFpBZhX0jhN2gmhHSe5ZgCEOWZ1PXWdV8jU5+CWIO+ZYT60aySNO2rDghGzLXkmQGCpDCM
="
"data"
:
"
P3mmQEAWoW8YQIDomgCRHDxeHF1lz7GrxKgwZQG/fezdjnKg4bRnWIjmEG3HGfhr9PIuFwN8XgWsZ9Mkw9QkpLyJ2n+0XVdu5v6I/6Fwiig
="
}
\ 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