Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car
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
car
Commits
e4d481d1
Commit
e4d481d1
authored
May 28, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
196270ea
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
190 additions
and
155 deletions
+190
-155
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+127
-15
common.pac
assets/Bundles/MainGame/png/common.pac
+0
-3
common.pac.meta
assets/Bundles/MainGame/png/common.pac.meta
+0
-1
RulePanel.prefab
assets/Bundles/RulePanel/RulePanel.prefab
+6
-94
close.png
assets/Bundles/common/close.png
+0
-0
close.png.meta
assets/Bundles/common/close.png.meta
+28
-28
CarCarColorsComponent.ts
.../CarColorsGame/Scrips/Components/CarCarColorsComponent.ts
+3
-1
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+26
-13
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
e4d481d1
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
"_active": true,
"_active": true,
"_components": [],
"_components": [],
"_prefab": {
"_prefab": {
"__id__": 1
58
"__id__": 1
61
},
},
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
},
},
"autoReleaseAssets": false,
"autoReleaseAssets": false,
"_globals": {
"_globals": {
"__id__": 16
2
"__id__": 16
5
},
},
"_id": "2c42d766-165b-48f3-b337-ed539df8fa45"
"_id": "2c42d766-165b-48f3-b337-ed539df8fa45"
},
},
...
@@ -3911,15 +3911,18 @@
...
@@ -3911,15 +3911,18 @@
},
},
{
{
"__id__": 153
"__id__": 153
},
{
"__id__": 156
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 15
6
"__id__": 15
9
},
},
{
{
"__id__": 1
57
"__id__": 1
60
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -5531,6 +5534,115 @@
...
@@ -5531,6 +5534,115 @@
"_atlas": null,
"_atlas": null,
"_id": "f7YFfxFJhCHYCLqE1xMDOc"
"_id": "f7YFfxFJhCHYCLqE1xMDOc"
},
},
{
"__type__": "cc.Node",
"_name": "banner",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 113
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 157
},
{
"__id__": 158
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -511.884,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "49ef/8fXdEFaDgkBZocjiF"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 156
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 687,
"height": 154
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "67MjWM5pFNp7u1LYzkU0ML"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 156
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "5084325f-5785-4e49-bad2-8ba2bede881c@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "275vFB0WdN+bTaWOY1rJXb"
},
{
{
"__type__": "cc.UITransform",
"__type__": "cc.UITransform",
"_name": "",
"_name": "",
...
@@ -5573,7 +5685,7 @@
...
@@ -5573,7 +5685,7 @@
"instance": null,
"instance": null,
"targetOverrides": [
"targetOverrides": [
{
{
"__id__": 1
59
"__id__": 1
62
}
}
],
],
"nestedPrefabInstanceRoots": [
"nestedPrefabInstanceRoots": [
...
@@ -5588,7 +5700,7 @@
...
@@ -5588,7 +5700,7 @@
"__id__": 91
"__id__": 91
},
},
"sourceInfo": {
"sourceInfo": {
"__id__": 16
0
"__id__": 16
3
},
},
"propertyPath": [
"propertyPath": [
"_trailModule",
"_trailModule",
...
@@ -5598,7 +5710,7 @@
...
@@ -5598,7 +5710,7 @@
"__id__": 91
"__id__": 91
},
},
"targetInfo": {
"targetInfo": {
"__id__": 16
1
"__id__": 16
4
}
}
},
},
{
{
...
@@ -5616,28 +5728,28 @@
...
@@ -5616,28 +5728,28 @@
{
{
"__type__": "cc.SceneGlobals",
"__type__": "cc.SceneGlobals",
"ambient": {
"ambient": {
"__id__": 16
3
"__id__": 16
6
},
},
"shadows": {
"shadows": {
"__id__": 16
4
"__id__": 16
7
},
},
"_skybox": {
"_skybox": {
"__id__": 16
5
"__id__": 16
8
},
},
"fog": {
"fog": {
"__id__": 16
6
"__id__": 16
9
},
},
"octree": {
"octree": {
"__id__": 1
67
"__id__": 1
70
},
},
"skin": {
"skin": {
"__id__": 1
68
"__id__": 1
71
},
},
"lightProbeInfo": {
"lightProbeInfo": {
"__id__": 1
69
"__id__": 1
72
},
},
"postSettings": {
"postSettings": {
"__id__": 17
0
"__id__": 17
3
},
},
"bakedWithStationaryMainLight": false,
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
"bakedWithHighpLightmap": false
...
...
assets/Bundles/MainGame/png/common.pac
deleted
100644 → 0
View file @
196270ea
{
"__type__": "cc.SpriteAtlas"
}
assets/Bundles/MainGame/png/common.pac.meta
deleted
100644 → 0
View file @
196270ea
{"ver":"1.0.8","importer":"auto-atlas","imported":true,"uuid":"31c7198f-7908-4293-a671-3324b8f85eb3","files":[".json"],"subMetas":{},"userData":{"maxWidth":2048,"maxHeight":2048,"padding":2,"allowRotation":true,"forceSquared":false,"powerOfTwo":false,"algorithm":"MaxRects","format":"png","quality":80,"contourBleed":true,"paddingBleed":true,"filterUnused":false,"removeTextureInBundle":true,"removeImageInBundle":true,"removeSpriteAtlasInBundle":true,"compressSettings":{},"textureSetting":{"wrapModeS":"repeat","wrapModeT":"repeat","minfilter":"linear","magfilter":"linear","mipfilter":"none","anisotropy":0}}}
assets/Bundles/RulePanel/RulePanel.prefab
View file @
e4d481d1
...
@@ -35,16 +35,10 @@
...
@@ -35,16 +35,10 @@
},
},
{
{
"__id__": 54
"__id__": 54
},
{
"__id__": 56
},
{
"__id__": 58
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
61
"__id__":
56
},
},
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
...
@@ -279,8 +273,8 @@
...
@@ -279,8 +273,8 @@
},
},
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x":
430
,
"x":
-7
,
"y":
275.00000000000006
,
"y":
712
,
"z": 0
"z": 0
},
},
"_lrot": {
"_lrot": {
...
@@ -515,7 +509,7 @@
...
@@ -515,7 +509,7 @@
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 0,
"x": 0,
"y":
197.53799999999995
,
"y":
634.5379999999999
,
"z": 0
"z": 0
},
},
"_lrot": {
"_lrot": {
...
@@ -1167,8 +1161,8 @@
...
@@ -1167,8 +1161,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
1624
,
"width":
750
,
"height":
750
"height":
1624
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1217,88 +1211,6 @@
...
@@ -1217,88 +1211,6 @@
"__type__": "cc.CompPrefabInfo",
"__type__": "cc.CompPrefabInfo",
"fileId": "cd+4wPXj1HvLk30seu5z2Q"
"fileId": "cd+4wPXj1HvLk30seu5z2Q"
},
},
{
"__type__": "fbcc1s8CHlK1IBn1pSOdYjY",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 57
},
"closeBtn": {
"__id__": 10
},
"ruleNode": {
"__id__": 23
},
"content": {
"__id__": 22
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "77qCogUmxAApr9Rtx2lEoR"
},
{
"__type__": "057b4KT4QZKeoxpS+8IVX1z",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 59
},
"skinNodeArr": [
{
"__id__": 60
}
],
"_genSkinNode": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "17tndhkHNMVrqqBBLdWBvz"
},
{
"__type__": "SkinNode",
"node": {
"__id__": 10
},
"type": 0,
"color1": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"color2": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"skin1": {
"__uuid__": "ea3df70a-ec3f-43a7-9eaa-b2fd3b44889a@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"skin2": {
"__uuid__": "a53c8f88-3950-4ae1-8343-70a5260ea6be@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"node1": null,
"node2": null
},
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
...
...
assets/Bundles/common/close.png
View replaced file @
196270ea
View file @
e4d481d1
1.25 KB
|
W:
|
H:
2.67 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/Bundles/common/close.png.meta
View file @
e4d481d1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"ver": "1.0.27",
"ver": "1.0.27",
"importer": "image",
"importer": "image",
"imported": true,
"imported": true,
"uuid": "
ad97e5f2-485d-4ebb-a1ef-a63c1c32115a
",
"uuid": "
5197a928-5a20-45ee-8a2c-a5fece17e9b7
",
"files": [
"files": [
".json",
".json",
".png"
".png"
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
"subMetas": {
"subMetas": {
"6c48a": {
"6c48a": {
"importer": "texture",
"importer": "texture",
"uuid": "
ad97e5f2-485d-4ebb-a1ef-a63c1c32115a
@6c48a",
"uuid": "
5197a928-5a20-45ee-8a2c-a5fece17e9b7
@6c48a",
"displayName": "close",
"displayName": "close",
"id": "6c48a",
"id": "6c48a",
"name": "texture",
"name": "texture",
"userData": {
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "
ad97e5f2-485d-4ebb-a1ef-a63c1c32115a
",
"imageUuidOrDatabaseUri": "
5197a928-5a20-45ee-8a2c-a5fece17e9b7
",
"isUuid": true,
"isUuid": true,
"visible": false,
"visible": false,
"minfilter": "linear",
"minfilter": "linear",
...
@@ -34,22 +34,21 @@
...
@@ -34,22 +34,21 @@
},
},
"f9941": {
"f9941": {
"importer": "sprite-frame",
"importer": "sprite-frame",
"uuid": "
ad97e5f2-485d-4ebb-a1ef-a63c1c32115a
@f9941",
"uuid": "
5197a928-5a20-45ee-8a2c-a5fece17e9b7
@f9941",
"displayName": "close",
"displayName": "close",
"id": "f9941",
"id": "f9941",
"name": "spriteFrame",
"name": "spriteFrame",
"userData": {
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"trimThreshold": 1,
"rotated": false,
"rotated": false,
"offsetX": 0,
"offsetX": 0,
"offsetY": 0,
"offsetY": 0,
"trimX": 0,
"trimX": 0,
"trimY": 0,
"trimY": 0,
"width": 5
8
,
"width": 5
7
,
"height": 5
8
,
"height": 5
7
,
"rawWidth": 5
8
,
"rawWidth": 5
7
,
"rawHeight": 5
8
,
"rawHeight": 5
7
,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft": 0,
...
@@ -61,17 +60,17 @@
...
@@ -61,17 +60,17 @@
"meshType": 0,
"meshType": 0,
"vertices": {
"vertices": {
"rawPosition": [
"rawPosition": [
-2
9
,
-2
8.5
,
-2
9
,
-2
8.5
,
0,
0,
2
9
,
2
8.5
,
-2
9
,
-2
8.5
,
0,
0,
-2
9
,
-2
8.5
,
2
9
,
2
8.5
,
0,
0,
2
9
,
2
8.5
,
2
9
,
2
8.5
,
0
0
],
],
"indexes": [
"indexes": [
...
@@ -84,12 +83,12 @@
...
@@ -84,12 +83,12 @@
],
],
"uv": [
"uv": [
0,
0,
5
8
,
5
7
,
5
8
,
5
7
,
5
8
,
5
7
,
0,
0,
0,
0,
5
8
,
5
7
,
0
0
],
],
"nuv": [
"nuv": [
...
@@ -103,19 +102,20 @@
...
@@ -103,19 +102,20 @@
1
1
],
],
"minPos": [
"minPos": [
-2
9
,
-2
8.5
,
-2
9
,
-2
8.5
,
0
0
],
],
"maxPos": [
"maxPos": [
2
9
,
2
8.5
,
2
9
,
2
8.5
,
0
0
]
]
},
},
"isUuid": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "ad97e5f2-485d-4ebb-a1ef-a63c1c32115a@6c48a",
"imageUuidOrDatabaseUri": "5197a928-5a20-45ee-8a2c-a5fece17e9b7@6c48a",
"atlasUuid": ""
"atlasUuid": "",
"trimType": "auto"
},
},
"ver": "1.0.12",
"ver": "1.0.12",
"imported": true,
"imported": true,
...
@@ -129,6 +129,6 @@
...
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"type": "sprite-frame",
"hasAlpha": true,
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "
ad97e5f2-485d-4ebb-a1ef-a63c1c32115a
@6c48a"
"redirect": "
5197a928-5a20-45ee-8a2c-a5fece17e9b7
@6c48a"
}
}
}
}
assets/CarColorsGame/Scrips/Components/CarCarColorsComponent.ts
View file @
e4d481d1
...
@@ -5,6 +5,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
...
@@ -5,6 +5,7 @@ import { CarColorsGlobalInstance } from '../CarColorsGlobalInstance';
import
{
EDITOR_NOT_IN_PREVIEW
}
from
'cc/env'
;
import
{
EDITOR_NOT_IN_PREVIEW
}
from
'cc/env'
;
import
{
showPanel
}
from
"db://assets/core/Module/UIFast"
;
import
{
showPanel
}
from
"db://assets/core/Module/UIFast"
;
import
{
SuccessPage
}
from
"db://assets/Scripts/Panels/SuccessPage"
;
import
{
SuccessPage
}
from
"db://assets/Scripts/Panels/SuccessPage"
;
import
{
MainGame
}
from
"db://assets/Scripts/Scenes/MainGame/MainGame"
;
const
{
ccclass
,
property
,
executeInEditMode
}
=
_decorator
;
const
{
ccclass
,
property
,
executeInEditMode
}
=
_decorator
;
...
@@ -145,7 +146,8 @@ export class CarCarColorsComponent extends Component {
...
@@ -145,7 +146,8 @@ export class CarCarColorsComponent extends Component {
// 判定胜利
// 判定胜利
if
(
CarColorsGlobalInstance
.
instance
.
carSysterm
.
activeCar
.
size
===
0
)
{
if
(
CarColorsGlobalInstance
.
instance
.
carSysterm
.
activeCar
.
size
===
0
)
{
if
(
find
(
"Scene/Roles"
).
children
.
length
===
0
)
{
if
(
find
(
"Scene/Roles"
).
children
.
length
===
0
)
{
showPanel
(
SuccessPage
);
// showPanel(SuccessPage);
MainGame
.
ins
.
nextLevel
();
}
}
}
}
}
}
...
...
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
e4d481d1
import
{
_decorator
,
assetManager
,
find
,
instantiate
,
Prefab
,
Node
,
Label
}
from
'cc'
;
import
{
_decorator
,
assetManager
,
find
,
instantiate
,
Prefab
,
Node
,
Label
}
from
'cc'
;
import
Scene
from
"db://assets/core/Module/Scene"
;
import
Scene
from
"db://assets/core/Module/Scene"
;
import
{
changeScene
,
showToast
}
from
"db://assets/core/Module/UIFast"
;
import
{
changeScene
,
show
Panel
,
show
Toast
}
from
"db://assets/core/Module/UIFast"
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
{
AudioClipName
,
AudioMgr
}
from
"db://assets/core/base/AudioMgr"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
CarColorsGlobalInstance
}
from
"db://assets/CarColorsGame/Scrips/CarColorsGlobalInstance"
;
import
{
CarColorsGlobalInstance
}
from
"db://assets/CarColorsGame/Scrips/CarColorsGlobalInstance"
;
import
{
RoleCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/RoleCarColorsSysterm"
;
import
{
RoleCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/RoleCarColorsSysterm"
;
import
{
CarCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/CarCarColorsSysterm"
;
import
{
CarCarColorsSysterm
}
from
"db://assets/CarColorsGame/Scrips/Systerms/CarCarColorsSysterm"
;
import
{
SuccessPage
}
from
"db://assets/Scripts/Panels/SuccessPage"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
@
ccclass
(
'MainGame'
)
@
ccclass
(
'MainGame'
)
export
class
MainGame
extends
Scene
{
export
class
MainGame
extends
Scene
{
static
ins
:
MainGame
=
null
;
static
skin
:
string
=
"MainGame"
;
static
skin
:
string
=
"MainGame"
;
static
bundle
:
string
=
"MainGame"
;
static
bundle
:
string
=
"MainGame"
;
...
@@ -20,9 +23,14 @@ export class MainGame extends Scene {
...
@@ -20,9 +23,14 @@ export class MainGame extends Scene {
@
property
(
Node
)
gamePre
:
Node
=
null
;
@
property
(
Node
)
gamePre
:
Node
=
null
;
onLoad
()
{
onLoad
()
{
MainGame
.
ins
=
this
;
this
.
gamePre
.
active
=
false
;
this
.
gamePre
.
active
=
false
;
}
}
onDestroy
()
{
MainGame
.
ins
=
null
;
}
async
start
()
{
async
start
()
{
// 人物管理系统
// 人物管理系统
CarColorsGlobalInstance
.
instance
.
roleSysterm
=
this
.
node
.
addComponent
(
RoleCarColorsSysterm
)
CarColorsGlobalInstance
.
instance
.
roleSysterm
=
this
.
node
.
addComponent
(
RoleCarColorsSysterm
)
...
@@ -46,38 +54,43 @@ export class MainGame extends Scene {
...
@@ -46,38 +54,43 @@ export class MainGame extends Scene {
}
}
async
nextLevel
()
{
async
nextLevel
()
{
if
(
this
.
level
>=
5
)
{
showPanel
(
SuccessPage
);
return
;
}
this
.
level
++
;
this
.
level
++
;
this
.
showPre
();
this
.
showPre
();
find
(
"Scene/Parkings"
).
children
.
forEach
((
child
,
index
)
=>
{
find
(
"Scene/Parkings"
).
children
.
forEach
((
child
,
index
)
=>
{
if
(
index
<
4
)
{
if
(
index
<
4
)
{
child
.
name
=
"empty"
child
.
name
=
"empty"
;
}
else
{
}
else
{
child
.
name
=
"lock"
child
.
name
=
"lock"
;
child
.
children
[
0
].
children
[
0
].
active
=
false
child
.
children
[
0
].
children
[
0
].
active
=
false
;
child
.
children
[
0
].
children
[
1
].
active
=
true
child
.
children
[
0
].
children
[
1
].
active
=
true
;
}
}
child
.
children
[
1
]?.
destroy
()
child
.
children
[
1
]?.
destroy
()
;
child
.
children
[
1
]?.
removeFromParent
()
child
.
children
[
1
]?.
removeFromParent
()
;
})
})
find
(
"Scene/Parkings"
).
active
=
true
find
(
"Scene/Parkings"
).
active
=
true
;
CarColorsGlobalInstance
.
instance
.
roleSysterm
.
clearAll
()
CarColorsGlobalInstance
.
instance
.
roleSysterm
.
clearAll
()
;
CarColorsGlobalInstance
.
instance
.
carSysterm
.
clearAll
()
CarColorsGlobalInstance
.
instance
.
carSysterm
.
clearAll
()
;
const
level
=
await
new
Promise
<
Prefab
>
((
resolve
)
=>
{
const
level
=
await
new
Promise
<
Prefab
>
((
resolve
)
=>
{
assetManager
.
getBundle
(
"MainGame"
)
assetManager
.
getBundle
(
"MainGame"
)
.
load
(
`Levels/level
${
this
.
level
}
`
,
Prefab
,
(
err
,
prefab
:
Prefab
)
=>
{
.
load
(
`Levels/level
${
this
.
level
}
`
,
Prefab
,
(
err
,
prefab
:
Prefab
)
=>
{
if
(
err
)
{
if
(
err
)
{
resolve
(
null
);
resolve
(
null
);
return
return
;
}
}
resolve
(
prefab
);
resolve
(
prefab
);
});
});
});
});
if
(
!
level
)
{
if
(
!
level
)
{
showToast
(
"没有更多关卡了"
);
showToast
(
"没有更多关卡了"
);
changeScene
(
HomeScene
);
changeScene
(
HomeScene
);
return
;
return
;
...
@@ -88,7 +101,7 @@ export class MainGame extends Scene {
...
@@ -88,7 +101,7 @@ export class MainGame extends Scene {
for
(
let
i
=
0
;
i
<
levelNode
.
children
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
levelNode
.
children
.
length
;
i
++
)
{
CarColorsGlobalInstance
.
instance
.
carSysterm
.
addCar
(
levelNode
.
children
[
i
]);
CarColorsGlobalInstance
.
instance
.
carSysterm
.
addCar
(
levelNode
.
children
[
i
]);
}
}
CarColorsGlobalInstance
.
instance
.
roleSysterm
.
initLevel
()
CarColorsGlobalInstance
.
instance
.
roleSysterm
.
initLevel
()
;
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
start
);
AudioMgr
.
ins
.
playOneShot
(
AudioClipName
.
start
);
}
}
...
...
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