feat: 添加页面管理系统和首页/关卡页面

- 实现 ViewManager 单例页面管理器,支持页面注册、打开、关闭、缓存
- 实现 BaseView 页面基类,提供统一的页面生命周期
- 添加 PageHome 首页,包含开始游戏按钮跳转功能
- 添加 PageLevel 关卡页面,继承 BaseView
- 更新 PageLoading 支持进度条显示和页面预加载
- 添加相关图片资源和预制体

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
richarjiang
2026-03-11 10:02:29 +08:00
parent 02a67909d6
commit 8986d8d8f2
29 changed files with 5456 additions and 61 deletions

View File

@@ -3,6 +3,7 @@
"__type__": "cc.SceneAsset",
"_name": "main",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"scene": {
"__id__": 1
@@ -10,8 +11,9 @@
},
{
"__type__": "cc.Scene",
"_name": "scene-2d",
"_name": "main",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
@@ -20,42 +22,13 @@
],
"_active": true,
"_components": [],
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 8
"_prefab": {
"__id__": 17
},
"_id": "d60530e8-06be-4ac4-8613-9cc604c77f32"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 5
},
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 480,
"y": 320.00000000000006,
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
@@ -71,6 +44,72 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 18
},
"_id": "d60530e8-06be-4ac4-8613-9cc604c77f32"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
},
{
"__id__": 15
},
{
"__id__": 16
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 540,
"y": 1080,
"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",
@@ -84,6 +123,7 @@
"__type__": "cc.Node",
"_name": "Camera",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
@@ -99,7 +139,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"z": 1000
},
"_lrot": {
"__type__": "cc.Quat",
@@ -114,6 +154,7 @@
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
@@ -127,6 +168,7 @@
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
@@ -136,7 +178,7 @@
"_priority": 0,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 10,
"_orthoHeight": 1080,
"_near": 0,
"_far": 2000,
"_color": {
@@ -162,12 +204,128 @@
"_screenScale": 1,
"_visibility": 1108344832,
"_targetTexture": null,
"_postProcess": null,
"_usePostProcess": false,
"_cameraType": -1,
"_trackingType": 0,
"_id": "63WIch3o5BEYRlXzTT0oWc"
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_prefab": {
"__id__": 6
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
},
"asset": {
"__uuid__": "79949d26-c169-4e68-ad10-a1242a9679a8",
"__expectedType__": "cc.Prefab"
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": {
"__id__": 7
},
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "895CV8V5xCQYBK4UFRhlwD",
"prefabRootNode": null,
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 11
},
{
"__id__": 12
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_name"
],
"value": "PageLoading"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"c46/YsCPVOJYA4mWEpNYRx"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -175,8 +333,8 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
"width": 1080,
"height": 2160
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -189,6 +347,7 @@
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -204,6 +363,7 @@
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
@@ -229,26 +389,59 @@
"_lockFlags": 0,
"_id": "c5V1EV8IpMtrIvY1OE9t2u"
},
{
"__type__": "66d6c15rzdAT4lpaFk0+5gx",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": null,
"_id": "c2b3nbzv9JuZmP2jxQyN72"
},
{
"__type__": "cc.PrefabInfo",
"root": null,
"asset": null,
"fileId": "d60530e8-06be-4ac4-8613-9cc604c77f32",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 5
}
]
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 9
"__id__": 19
},
"shadows": {
"__id__": 10
"__id__": 20
},
"_skybox": {
"__id__": 11
"__id__": 21
},
"fog": {
"__id__": 12
"__id__": 22
},
"octree": {
"__id__": 13
"__id__": 23
},
"skin": {
"__id__": 14
}
"__id__": 24
},
"lightProbeInfo": {
"__id__": 25
},
"postSettings": {
"__id__": 26
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
},
{
"__type__": "cc.AmbientInfo",
@@ -309,6 +502,7 @@
"z": 0
},
"_distance": 0,
"_planeBias": 1,
"_shadowColor": {
"__type__": "cc.Color",
"r": 76,
@@ -332,7 +526,11 @@
"_diffuseMapHDR": null,
"_diffuseMapLDR": null,
"_enabled": false,
"_useHDR": true
"_useHDR": true,
"_editableMaterial": null,
"_reflectionHDR": null,
"_reflectionLDR": null,
"_rotationAngle": 0
},
{
"__type__": "cc.FogInfo",
@@ -373,6 +571,23 @@
{
"__type__": "cc.SkinInfo",
"_enabled": false,
"_scale": 5
"_blurRadius": 0.01,
"_sssIntensity": 3
},
{
"__type__": "cc.LightProbeInfo",
"_giScale": 1,
"_giSamples": 1024,
"_bounces": 2,
"_reduceRinging": 0,
"_showProbe": true,
"_showWireframe": true,
"_showConvex": false,
"_data": null,
"_lightProbeSphereVolume": 1
},
{
"__type__": "cc.PostSettingsInfo",
"_toneMappingType": 0
}
]