Commit e4d481d1 authored by haiyoucuv's avatar haiyoucuv

init

parent 196270ea
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 158 "__id__": 161
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 162 "__id__": 165
}, },
"_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__": 156 "__id__": 159
}, },
{ {
"__id__": 157 "__id__": 160
} }
], ],
"_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__": 159 "__id__": 162
} }
], ],
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
...@@ -5588,7 +5700,7 @@ ...@@ -5588,7 +5700,7 @@
"__id__": 91 "__id__": 91
}, },
"sourceInfo": { "sourceInfo": {
"__id__": 160 "__id__": 163
}, },
"propertyPath": [ "propertyPath": [
"_trailModule", "_trailModule",
...@@ -5598,7 +5710,7 @@ ...@@ -5598,7 +5710,7 @@
"__id__": 91 "__id__": 91
}, },
"targetInfo": { "targetInfo": {
"__id__": 161 "__id__": 164
} }
}, },
{ {
...@@ -5616,28 +5728,28 @@ ...@@ -5616,28 +5728,28 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 163 "__id__": 166
}, },
"shadows": { "shadows": {
"__id__": 164 "__id__": 167
}, },
"_skybox": { "_skybox": {
"__id__": 165 "__id__": 168
}, },
"fog": { "fog": {
"__id__": 166 "__id__": 169
}, },
"octree": { "octree": {
"__id__": 167 "__id__": 170
}, },
"skin": { "skin": {
"__id__": 168 "__id__": 171
}, },
"lightProbeInfo": { "lightProbeInfo": {
"__id__": 169 "__id__": 172
}, },
"postSettings": { "postSettings": {
"__id__": 170 "__id__": 173
}, },
"bakedWithStationaryMainLight": false, "bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false "bakedWithHighpLightmap": false
......
{
"__type__": "cc.SpriteAtlas"
}
{"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}}}
...@@ -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

1.25 KB | W: | H:

assets/Bundles/common/close.png

2.67 KB | W: | H:

assets/Bundles/common/close.png
assets/Bundles/common/close.png
assets/Bundles/common/close.png
assets/Bundles/common/close.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -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": 58, "width": 57,
"height": 58, "height": 57,
"rawWidth": 58, "rawWidth": 57,
"rawHeight": 58, "rawHeight": 57,
"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": [
-29, -28.5,
-29, -28.5,
0, 0,
29, 28.5,
-29, -28.5,
0, 0,
-29, -28.5,
29, 28.5,
0, 0,
29, 28.5,
29, 28.5,
0 0
], ],
"indexes": [ "indexes": [
...@@ -84,12 +83,12 @@ ...@@ -84,12 +83,12 @@
], ],
"uv": [ "uv": [
0, 0,
58, 57,
58, 57,
58, 57,
0, 0,
0, 0,
58, 57,
0 0
], ],
"nuv": [ "nuv": [
...@@ -103,19 +102,20 @@ ...@@ -103,19 +102,20 @@
1 1
], ],
"minPos": [ "minPos": [
-29, -28.5,
-29, -28.5,
0 0
], ],
"maxPos": [ "maxPos": [
29, 28.5,
29, 28.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"
} }
} }
...@@ -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();
} }
} }
} }
......
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, showPanel, showToast } 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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment