This commit is contained in:
PC-20230316NUNE\Administrator 2023-12-10 00:58:43 +08:00
parent e4a93711bd
commit 24a498a712
23 changed files with 2020 additions and 8 deletions

View File

@ -348,6 +348,10 @@
{ {
"__uuid__": "b882ecdb-012a-4d85-b799-e4da5991c0dd", "__uuid__": "b882ecdb-012a-4d85-b799-e4da5991c0dd",
"__expectedType__": "cc.Prefab" "__expectedType__": "cc.Prefab"
},
{
"__uuid__": "cb2991f1-750a-4493-81df-781807f8bec2",
"__expectedType__": "cc.Prefab"
} }
], ],
"_id": "" "_id": ""

View File

@ -0,0 +1,707 @@
[
{
"__type__": "cc.Prefab",
"_name": "CampGuardianMode",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "CampGuardianMode",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 18
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 26
},
{
"__id__": 28
}
],
"_prefab": {
"__id__": 30
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Map",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 15
}
],
"_prefab": {
"__id__": 17
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 75.97,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "MAP2_2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 6
}
],
"_prefab": {
"__id__": 8
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 523.294,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.46,
"y": 1.46,
"z": 1.46
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1200,
"height": 530
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "02JaCy2RtBv6IQedYySi9J"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "13ffba43-826c-4f33-8ac2-4b59811ce9b0@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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4fkgqaKsNJ2bWL29nICOgi"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "51KkM8+RpPXbBFXOTtb9rJ",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "MAP2_1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 14
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 124.735,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.46,
"y": 1.46,
"z": 1.46
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1200,
"height": 643
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "08W8yrO6ZAMYoLsN5M67nH"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "30250fcc-aac2-4473-94bf-7688cf16a604@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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8fnMp4WlZP54syw5QNPIMP"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "35BC8iioRG9YIjz054LzvN",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 16
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "10qY81RfZAO71vWAsMbNxA"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7dQpog1zRHRanaq1MbAxcj",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Camera",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 370,
"z": 1000
},
"_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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 18
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_projection": 0,
"_priority": 0,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 640,
"_near": 0,
"_far": 1000,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": 1,
"_stencil": 0,
"_clearFlags": 6,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_aperture": 19,
"_shutter": 7,
"_iso": 0,
"_screenScale": 1,
"_visibility": 1073741825,
"_targetTexture": {
"__uuid__": "0aace819-1a93-43fc-90a6-43189c1dbf89",
"__expectedType__": "cc.RenderTexture"
},
"_postProcess": null,
"_usePostProcess": false,
"_cameraType": -1,
"_trackingType": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1b2xkGjC1C3YiTWhP0H/mc"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "9bI7zPvJdGubwAAo2uT7KC",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "GObject",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
}
],
"_prefab": {
"__id__": 25
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "51F2pLtaRAvIrZ6+pAQ7gN"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "afU00zeEBCvYG08IYSwZ58",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 27
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "36KI0wow1LqrcICgBTdo4H"
},
{
"__type__": "31e6dKeQdRNfaJKs3+cDKq9",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"rolePrefab": {
"__uuid__": "e989c288-5957-41c1-953c-190622651f52",
"__expectedType__": "cc.Prefab"
},
"objects": {
"__id__": 22
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "75m4P6RWFEhq6MmD8wKppa"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "073cpMY+ZFPqtOHf+oOHD6",
"instance": null,
"targetOverrides": null
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "cb2991f1-750a-4493-81df-781807f8bec2",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "CampGuardianMode"
}
}

View File

@ -3,6 +3,7 @@
"__type__": "cc.Prefab", "__type__": "cc.Prefab",
"_name": "GPVPMode", "_name": "GPVPMode",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"_native": "", "_native": "",
"data": { "data": {
"__id__": 1 "__id__": 1
@ -69,6 +70,7 @@
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Map", "_name": "Map",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
@ -122,6 +124,7 @@
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "MAP2_2", "_name": "MAP2_2",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
@ -171,6 +174,7 @@
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 3 "__id__": 3
}, },
@ -198,6 +202,7 @@
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 3 "__id__": 3
}, },
@ -255,6 +260,7 @@
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "MAP2_1", "_name": "MAP2_1",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
@ -304,6 +310,7 @@
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 9 "__id__": 9
}, },
@ -331,6 +338,7 @@
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 9 "__id__": 9
}, },
@ -388,6 +396,7 @@
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 2 "__id__": 2
}, },
@ -428,6 +437,7 @@
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "GObject", "_name": "GObject",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
@ -474,6 +484,7 @@
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {},
"node": { "node": {
"__id__": 18 "__id__": 18
}, },

View File

@ -733,7 +733,7 @@
"_skeletonData": null, "_skeletonData": null,
"defaultSkin": "", "defaultSkin": "",
"defaultAnimation": "", "defaultAnimation": "",
"_premultipliedAlpha": true, "_premultipliedAlpha": false,
"_timeScale": 1, "_timeScale": 1,
"_preCacheMode": 0, "_preCacheMode": 0,
"_cacheMode": 0, "_cacheMode": 0,
@ -743,7 +743,7 @@
"_debugMesh": false, "_debugMesh": false,
"_debugBones": false, "_debugBones": false,
"_debugSlots": false, "_debugSlots": false,
"_enableBatch": false, "_enableBatch": true,
"loop": true, "loop": true,
"_id": "" "_id": ""
}, },

View File

@ -450,6 +450,7 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "08xLpDDa9NlK3pgR7XiOqb", "fileId": "08xLpDDa9NlK3pgR7XiOqb",
"instance": null "instance": null,
"targetOverrides": null
} }
] ]

View File

@ -368,14 +368,14 @@
"_premultipliedAlpha": false, "_premultipliedAlpha": false,
"_timeScale": 1, "_timeScale": 1,
"_preCacheMode": -1, "_preCacheMode": -1,
"_cacheMode": 0, "_cacheMode": 1,
"_defaultCacheMode": 0, "_defaultCacheMode": 1,
"_sockets": [], "_sockets": [],
"_useTint": false, "_useTint": false,
"_debugMesh": false, "_debugMesh": false,
"_debugBones": false, "_debugBones": false,
"_debugSlots": false, "_debugSlots": false,
"_enableBatch": false, "_enableBatch": true,
"loop": true, "loop": true,
"_id": "" "_id": ""
}, },

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "572d8af0-198b-4b44-8263-2f2def915f04",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "8da408f1-a62e-41d0-b544-83aca624c9de",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "阵营守护战斗页面"
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "2f7c0730-8820-4aab-91a4-2fdcae352aba",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,9 @@
{
"__type__": "cc.RenderTexture",
"content": {
"base": "2,2,0,0,0,0",
"w": 1440,
"h": 1280,
"n": "CampGuardian"
}
}

View File

@ -0,0 +1,40 @@
{
"ver": "1.2.2",
"importer": "render-texture",
"imported": true,
"uuid": "0aace819-1a93-43fc-90a6-43189c1dbf89",
"files": [
".json"
],
"subMetas": {
"f9941": {
"importer": "rt-sprite-frame",
"uuid": "0aace819-1a93-43fc-90a6-43189c1dbf89@f9941",
"displayName": "CampGuardian",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"imageUuidOrDatabaseUri": "0aace819-1a93-43fc-90a6-43189c1dbf89",
"width": 1440,
"height": 1280
},
"ver": "1.0.0",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"width": 1440,
"height": 1280,
"anisotropy": 0,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"redirect": "0aace819-1a93-43fc-90a6-43189c1dbf89@f9941"
}
}

View File

@ -16,6 +16,8 @@ export enum BattleMode{
OnHook = 0, OnHook = 0,
//PVP 模式 //PVP 模式
PVP = 1, PVP = 1,
//阵营守护
CampGuardian = 2,
} }
export interface GBattleModeInfo{ export interface GBattleModeInfo{
@ -77,6 +79,7 @@ export default class GBattleModeManager extends Singleton {
this.modes = info.modes || []; this.modes = info.modes || [];
this.camera = info.camera; this.camera = info.camera;
this.root = info.root; this.root = info.root;
this.camera.enabled = false;
//监听帧同步 世界创建逻辑 //监听帧同步 世界创建逻辑
app.event.on(JNSyncFrameEvent.CLEAR,this.clear,this); app.event.on(JNSyncFrameEvent.CLEAR,this.clear,this);
@ -158,6 +161,8 @@ export default class GBattleModeManager extends Singleton {
private clear(){ private clear(){
if(!this.isInit) return; if(!this.isInit) return;
this.root.destroyAllChildren(); this.root.destroyAllChildren();
//关闭相机
this.camera.enabled = false;
} }
//创建当前模式 //创建当前模式
@ -165,6 +170,8 @@ export default class GBattleModeManager extends Singleton {
if(!this.isInit || this.current == null) return; if(!this.isInit || this.current == null) return;
let mode = instantiate(this.modes[this.current]); let mode = instantiate(this.modes[this.current]);
//关闭相机
this.camera.enabled = false;
mode.getComponent(GBaseMode).camera = this.camera; mode.getComponent(GBaseMode).camera = this.camera;
mode.getComponent(GBaseMode).data = this.data; mode.getComponent(GBaseMode).data = this.data;
this.root.addChild(mode) this.root.addChild(mode)

View File

@ -1,11 +1,54 @@
import { Vec2 } from "cc";
import GDefaultMode from "./default/GDefaultMode"; import GDefaultMode from "./default/GDefaultMode";
import { TB } from "../../../resources/config/data/schema";
import GRoleDefault from "../base/role/GRoleDefault";
//阵营守护 //阵营守护
//玩家派兵攻击对方阵营 游戏参考 //玩家派兵攻击对方阵营 游戏参考
export default class GCampGuardianMode extends GDefaultMode<{},{}>{ export default class GCampGuardianMode extends GDefaultMode<{},{}>{
//玩家水晶位置
playerPos: Vec2 = new Vec2(-400,0);
//敌方位置
enemyPos: Vec2 = new Vec2(400,0);
onSyncInitSuccess(){
} }
// //生成宠物
// onGenRole(info:TB.TbGRole):GRoleDefault {
// // let tactical = this.getInfo(type).tactical;
// // let pos:Vec2 = this.getInfo(type).tactical.getPosition(index);
// // if(!pos) return;
// // let role = instantiate(this.rolePrefab);
// // let entity = role.getComponent(GRoleDefault);
// // //初始化
// // entity.onInit(type,info,tactical,index);
// // //绑定寻敌
// // entity.onQueryEunmy = () => {
// // return this.getEnumy(entity,type);
// // }
// // //绑定死亡回调
// // entity.addKillBackEvent(this.onRoleKillBack.bind(this))
// // //绑定受击回调
// // entity.addHitCallback(this.onHitBack.bind(this));
// // this.addGObject(entity,tactical.getPosition(index));
// // this.getOnesRole(type).push(entity);
// // return entity;
// }
}

View File

@ -115,6 +115,7 @@ export default class GOnHookMode extends GDefaultMode<{},{}>{
console.log("GOnHookMode 模式初始化"); console.log("GOnHookMode 模式初始化");
//调整相机 //调整相机
this.camera.enabled = true;
let camreaPos = this.camera.node.worldPosition; let camreaPos = this.camera.node.worldPosition;
this.camera.node.worldPosition = v3(0,800,camreaPos.z) this.camera.node.worldPosition = v3(0,800,camreaPos.z)

View File

@ -110,6 +110,7 @@ export default class GPVPMode extends GBaseMode<{},GPVPStart>{
onSyncInitSuccess(): void { onSyncInitSuccess(): void {
//调整相机 //调整相机
this.camera.enabled = true;
let camreaPos = this.camera.node.worldPosition; let camreaPos = this.camera.node.worldPosition;
this.camera.node.worldPosition = v3(0,800,camreaPos.z) this.camera.node.worldPosition = v3(0,800,camreaPos.z)

View File

@ -17,6 +17,7 @@ export class HomeView extends JNGLayerBase {
frameText:Label; frameText:Label;
async onLoad(){ async onLoad(){
} }
update(){ update(){

View File

@ -32,7 +32,7 @@ export class MainView extends JNGLayerBase {
//打开Demo页面 //打开Demo页面
onOpenDemo(){ onOpenDemo(){
app.layer.Open(GUI.Home); app.layer.Open(GUI.CampGuardianView);
} }
//打开聊天页面 //打开聊天页面
@ -42,7 +42,7 @@ export class MainView extends JNGLayerBase {
//点击打开无限模式 //点击打开无限模式
onOpenOnHook(){ onOpenOnHook(){
GBattleModeManager.getIns().Open(BattleMode.OnHook,true); GBattleModeManager.getIns().Open(BattleMode.CampGuardian,true);
} }
//点击PVP模式 //点击PVP模式

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "3c57e80f-8355-46fc-9f1a-aea424211ea4",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,12 @@
import { _decorator, Component, Node } from 'cc';
import { JNGLayerBase } from '../../../components/JNComponent';
const { ccclass, property } = _decorator;
@ccclass('CampGuardianView')
export class CampGuardianView extends JNGLayerBase {
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d82fe384-5188-41e0-be33-86e8344bf6c0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -27,6 +27,7 @@ export enum GUI{
/**游戏模式页面 */ /**游戏模式页面 */
PVPModeMatchView = "PVPModeMatchView", //PVP模式匹配页面 PVPModeMatchView = "PVPModeMatchView", //PVP模式匹配页面
CampGuardianView = "CampGuardianView", //阵营守护战斗页面
Home = "Home", //主页面 Home = "Home", //主页面
Main = "Main", //主页面2 Main = "Main", //主页面2
@ -131,6 +132,11 @@ const UIGModeConfig:{ [key: string]: JNLayerInfo; } = {
uri: "prefab/ui/模式/PVP/PVP匹配页面", uri: "prefab/ui/模式/PVP/PVP匹配页面",
anims:BackOutScale anims:BackOutScale
}, },
[GUI.CampGuardianView]:{
layer:GLayer.Popup,
uri: "prefab/ui/模式/CampGuardian/阵营守护战斗页面",
anims:BackOutScale
},
} }