mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
提交捕捉
This commit is contained in:
parent
62b72bdcfc
commit
cb64a6c25f
File diff suppressed because it is too large
Load Diff
9
JisolGameCocos/assets/resources/prefab/ui/主页/野怪.meta
Normal file
9
JisolGameCocos/assets/resources/prefab/ui/主页/野怪.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "9dfe6258-273d-4107-ac09-d279fb04f952",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
1634
JisolGameCocos/assets/resources/prefab/ui/主页/野怪/野怪列表.prefab
Normal file
1634
JisolGameCocos/assets/resources/prefab/ui/主页/野怪/野怪列表.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a9053170-1055-4272-b3fd-ad6fa75b5f25",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "野怪列表"
|
||||
}
|
||||
}
|
296
JisolGameCocos/assets/resources/prefab/ui/主页/野怪/野怪列表ICON.prefab
Normal file
296
JisolGameCocos/assets/resources/prefab/ui/主页/野怪/野怪列表ICON.prefab
Normal file
@ -0,0 +1,296 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "野怪列表ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "野怪列表ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -217,
|
||||
"y": -50,
|
||||
"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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 3
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 2
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": {
|
||||
"__id__": 4
|
||||
},
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "92tNwwtwJEj5SOclnRjbw5",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "选择宠物ICON"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"02c3tqHwFAbp7zhkA22zq9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": null,
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"petIcon"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 11
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"a8v6Wyt6FBsbms2ouS3gEa"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "60HDOce21EU4mT/teH3tKt"
|
||||
},
|
||||
{
|
||||
"__type__": "590f9LG0/NBQ53k5HoSVyV6",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"icon": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a9goNZgrtIaozwZgOyRy/0"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": null,
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": {
|
||||
"__id__": 15
|
||||
},
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"icon"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 2
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"d4qo68UJJHyonQhZ4UFX08"
|
||||
]
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "29473705-12eb-4ba9-83f1-a4b75ad3a30f",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "野怪列表ICON"
|
||||
}
|
||||
}
|
474
JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab
Normal file
474
JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab
Normal file
@ -0,0 +1,474 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -217,
|
||||
"y": -50,
|
||||
"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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "背景",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_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": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "5dXmPodeBIzK9ZudCJ0lyM"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "20sb9VIT5KFIQeKj9xXgfd"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "5fFj0bKJZKHaJ1M3mytw3C",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -34,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e4A0L+eItAaJtEFXgkYXR2"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": null,
|
||||
"defaultSkin": "",
|
||||
"defaultAnimation": "",
|
||||
"_premultipliedAlpha": false,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": -1,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "4cHiUZWxdPRr49P1mMMVEz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "50gNLxcs1J8ZGN6PlbNEU8",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "60HDOce21EU4mT/teH3tKt"
|
||||
},
|
||||
{
|
||||
"__type__": "b3809FuWrhB2ovECDdqMTOs",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"spine": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a8v6Wyt6FBsbms2ouS3gEa"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Mask",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_type": 0,
|
||||
"_inverted": false,
|
||||
"_segments": 64,
|
||||
"_alphaThreshold": 0.1,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "10zYj9H5FENZXD89pQVuyU"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Graphics",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_lineWidth": 1,
|
||||
"_strokeColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_lineJoin": 2,
|
||||
"_lineCap": 0,
|
||||
"_fillColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 0
|
||||
},
|
||||
"_miterLimit": 10,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1broUYdiFORJt5rRvetp3L"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"uuid": "ef1f320e-328a-41c9-bfdc-ad17d402e14f",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "宠物ICON",
|
||||
"_name": "选择宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
@ -13,7 +13,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "宠物ICON",
|
||||
"_name": "选择宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
@ -26,22 +26,19 @@
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 26
|
||||
"__id__": 22
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 26
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -346,273 +343,115 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "背景",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
"__id__": 15
|
||||
},
|
||||
"_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": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"asset": {
|
||||
"__uuid__": "ef1f320e-328a-41c9-bfdc-ad17d402e14f",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
"targetOverrides": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "5dXmPodeBIzK9ZudCJ0lyM"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "20sb9VIT5KFIQeKj9xXgfd"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "eaan0oyQBEKJFVRxGbOCuw",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "5fFj0bKJZKHaJ1M3mytw3C",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 21
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 25
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_lpos": {
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "宠物ICON"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"02c3tqHwFAbp7zhkA22zq9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 18
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -34,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_lrot": {
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e4A0L+eItAaJtEFXgkYXR2"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": null,
|
||||
"defaultSkin": "",
|
||||
"defaultAnimation": "",
|
||||
"_premultipliedAlpha": false,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": -1,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "4cHiUZWxdPRr49P1mMMVEz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "50gNLxcs1J8ZGN6PlbNEU8",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
@ -624,7 +463,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 23
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -652,11 +491,9 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 29
|
||||
},
|
||||
"spine": {
|
||||
"__id__": 23
|
||||
"__id__": 25
|
||||
},
|
||||
"petIcon": null,
|
||||
"select": {
|
||||
"__id__": 8
|
||||
},
|
||||
@ -679,6 +516,37 @@
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 27
|
||||
}
|
||||
],
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 14
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": {
|
||||
"__id__": 24
|
||||
},
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"petIcon"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 14
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"a8v6Wyt6FBsbms2ouS3gEa"
|
||||
]
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "选择宠物ICON"
|
||||
}
|
||||
}
|
9
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏.meta
Normal file
9
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "decf04e2-b691-4a4e-8f3c-a3a25c5b0760",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
200
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏/受击文本.prefab
Normal file
200
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏/受击文本.prefab
Normal file
@ -0,0 +1,200 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "受击文本",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "受击文本",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_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": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 51.98828125,
|
||||
"height": 54.4
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b186ppLiZKhpRV4S4YdSvq"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "Hit",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 36,
|
||||
"_fontSize": 36,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 0,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": true,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "202sLGd8RLPYo4PayL2Ddw"
|
||||
},
|
||||
{
|
||||
"__type__": "fad17KCTqZBj4nGCb/xtHxi",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"hitLabel": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "ea6CTSqbJCFosx/ZPeThgW"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 49,
|
||||
"b": 49,
|
||||
"a": 255
|
||||
},
|
||||
"_width": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "efrxiMS+dIzZoddk4GEHvU"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "10gWQ16mdFu5gvlYBIDeBU",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "de8f19b4-20e0-4020-ac9c-8c52f9ffffa2",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "受击文本"
|
||||
}
|
||||
}
|
172
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏/游戏模式渲染.prefab
Normal file
172
JisolGameCocos/assets/resources/prefab/ui/常用预制体/游戏/游戏模式渲染.prefab
Normal file
@ -0,0 +1,172 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "游戏模式渲染",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "游戏模式渲染",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -360,
|
||||
"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": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "61k/3xmdtHe6Srw0droR6G"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "a0d1e275-5512-493e-8e15-7d2db8beb48e@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": "eb9IOPTBFJjLwXgqVCKLbC"
|
||||
},
|
||||
{
|
||||
"__type__": "00e93M1gwFDX4OxuD8p5I6L",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"hitPrefab": {
|
||||
"__uuid__": "de8f19b4-20e0-4020-ac9c-8c52f9ffffa2",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a1GrhIZWJFDo/VFCx6xwRM"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "64PJYFWgBDZrEsaiYwZxmh",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "1ee4a519-c5ef-453c-98d6-9940781b6fcc",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "游戏模式渲染"
|
||||
}
|
||||
}
|
296
JisolGameCocos/assets/resources/prefab/ui/阵法/阵法宠物ICON.prefab
Normal file
296
JisolGameCocos/assets/resources/prefab/ui/阵法/阵法宠物ICON.prefab
Normal file
@ -0,0 +1,296 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "阵法宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "阵法宠物ICON",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -217,
|
||||
"y": -50,
|
||||
"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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 3
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 2
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": {
|
||||
"__id__": 4
|
||||
},
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInstance",
|
||||
"fileId": "38bYsBY+lB0IKazeP060us",
|
||||
"prefabRootNode": {
|
||||
"__id__": 1
|
||||
},
|
||||
"mountedChildren": [],
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
],
|
||||
"value": "选择宠物ICON"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"02c3tqHwFAbp7zhkA22zq9"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 6
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
],
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": null,
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"petIcon"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 11
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"a8v6Wyt6FBsbms2ouS3gEa"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "60HDOce21EU4mT/teH3tKt"
|
||||
},
|
||||
{
|
||||
"__type__": "0d7f0xLgLJJ+7qr9McTG53a",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"select": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "6etm75eOVF37vJbMmq4O6z"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "02c3tqHwFAbp7zhkA22zq9",
|
||||
"instance": null,
|
||||
"targetOverrides": [
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetOverrideInfo",
|
||||
"source": {
|
||||
"__id__": 15
|
||||
},
|
||||
"sourceInfo": null,
|
||||
"propertyPath": [
|
||||
"select"
|
||||
],
|
||||
"target": {
|
||||
"__id__": 2
|
||||
},
|
||||
"targetInfo": {
|
||||
"__id__": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.TargetInfo",
|
||||
"localID": [
|
||||
"d4qo68UJJHyonQhZ4UFX08"
|
||||
]
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "阵法宠物ICON"
|
||||
}
|
||||
}
|
@ -957,7 +957,7 @@
|
||||
"__id__": 35
|
||||
},
|
||||
"itemPrefab": {
|
||||
"__uuid__": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"_id": ""
|
||||
@ -2092,7 +2092,7 @@
|
||||
"__id__": 37
|
||||
},
|
||||
"petIconPrefab": {
|
||||
"__uuid__": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
|
||||
"__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae",
|
||||
"__expectedType__": "cc.Prefab"
|
||||
},
|
||||
"spine": {
|
||||
|
@ -25,10 +25,12 @@ import { StorageData, StorageEnum } from "./consts/GData";
|
||||
import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI";
|
||||
import { AppData } from "./AppData";
|
||||
|
||||
let APIPath = `http://localhost:8080`
|
||||
let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `https://api.pet.jisol.cn`
|
||||
// let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
// let APIPath = `http://localhost:8080`
|
||||
// let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `http://192.168.0.123:8080`
|
||||
// let WsPath = `ws://192.168.0.123:8080/websocket`
|
||||
let APIPath = `https://api.pet.jisol.cn`
|
||||
let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
|
||||
//重写UI
|
||||
class JNGLayer extends JNLayer{
|
||||
|
@ -2,6 +2,7 @@ import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
||||
import { app } from './App';
|
||||
import { Env, JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
||||
import { GOnHookPets } from '../../extensions/ngame/assets/ngame/message/proto';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('Main')
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { _decorator, Component, Node, Prefab } from 'cc';
|
||||
import { Camera } from 'cc';
|
||||
import GBattleModeManager from './battle/GBattleModeManager';
|
||||
import { GData } from './consts/GData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('WorldCanvas')
|
||||
@ -18,6 +19,8 @@ export class WorldCanvas extends Component {
|
||||
|
||||
async onLoad(){
|
||||
|
||||
GData.WorldCanvas = this;
|
||||
|
||||
//重置相机位置
|
||||
this.camera.node.setWorldPosition(0,0,1000);
|
||||
|
||||
|
@ -58,7 +58,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
|
||||
//攻击回调
|
||||
attackCallbacks:Function[] = [];
|
||||
//添加受击回调
|
||||
//添加攻击回调
|
||||
addAttackCallback(fun:Function){this.attackCallbacks.push(fun)};
|
||||
|
||||
get():this{
|
||||
@ -147,7 +147,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
onHit(){
|
||||
// return;
|
||||
this.blood -= 10;
|
||||
this.hitCallbacks.forEach(fun => fun());
|
||||
this.hitCallbacks.forEach(fun => fun(this,10));
|
||||
//检测是否死亡
|
||||
if(this.blood <= 0){
|
||||
//关闭状态机
|
||||
|
@ -0,0 +1,18 @@
|
||||
import { _decorator } from "cc";
|
||||
import GRoleExpandBase from "../GRoleExpandBase";
|
||||
import { GOnHookPet } from "../../../../../../../extensions/ngame/assets/ngame/message/proto";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 无限模式 野怪 扩展类
|
||||
*/
|
||||
@ccclass('GRoleOnHookCreepsExpand')
|
||||
export default class GRoleOnHookCreepsExpand extends GRoleExpandBase<{}>{
|
||||
|
||||
//野怪
|
||||
creeps:GOnHookPet;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "edf60f56-5d3e-48d1-90b4-6deef4b5635c",
|
||||
"uuid": "3a21518a-766b-4f61-a59f-3e8825cf08f0",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
@ -1,13 +1,12 @@
|
||||
import { _decorator } from "cc";
|
||||
import GRoleDefault from "../../GRoleDefault";
|
||||
import GRoleExpandBase from "../GRoleExpandBase";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
* 角色 无限模式 扩展类
|
||||
* 无限模式 玩家 扩展类
|
||||
*/
|
||||
@ccclass('GRoleDefault')
|
||||
export default class GRoleOnHookExpand extends GRoleExpandBase<{}>{
|
||||
@ccclass('GRoleOnHookPlayerExpand')
|
||||
export default class GRoleOnHookPlayerExpand extends GRoleExpandBase<{}>{
|
||||
|
||||
//角色Id
|
||||
petId:number;
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3c2ff03b-a7e4-4afb-bb3c-ceacb17300ae",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -17,11 +17,13 @@ import { v2 } from "cc";
|
||||
import GFSMOnHookMode from "./OnHook/GFSMOnHookMode";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
import PlayerTacticalData, { PlayerTacticalEvent } from "../../data/PlayerTacticalData";
|
||||
import GRoleOnHookExpand from "../base/role/expand/OnHook/GRoleOnHookExpand";
|
||||
import GRoleOnHookPlayerExpand from "../base/role/expand/OnHook/GRoleOnHookPlayerExpand";
|
||||
import PlayerPetData from "../../data/PlayerPetData";
|
||||
import { GUI } from "../../ui/UIConfig";
|
||||
import { GAction } from "../../consts/GAction";
|
||||
import { GActionType } from "../../consts/GActionType";
|
||||
import { GOnHookPet, GOnHookPets } from "../../../../extensions/ngame/assets/ngame/message/proto";
|
||||
import GOnHookManager from "../../manager/battle/mode/GOnHookManager";
|
||||
import GRoleOnHookCreepsExpand from "../base/role/expand/OnHook/GRoleOnHookCreepsExpand";
|
||||
import { ModeRenderEvent } from "../../ui/Consts/Game/ModeRender";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
//挂机模式状态
|
||||
@ -45,18 +47,8 @@ export interface GOnHookInfo{
|
||||
roles: TB.TbGRole[];
|
||||
}
|
||||
|
||||
//野怪
|
||||
interface GOnHookPet{
|
||||
key:string; //野怪唯一Id
|
||||
petTbId:number; //野怪配置表Id
|
||||
}
|
||||
//野怪列表
|
||||
interface GOnHookPets{
|
||||
pets:GOnHookPet[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂机模式 无限出现小怪 (不是联机模式 该模式支持使用本地数据)
|
||||
* 挂机模式 无限出现小怪 (不是联机模式 该模式支持使用本地数据 和 API)
|
||||
*/
|
||||
@ccclass('GOnHookMode')
|
||||
export default class GOnHookMode extends GBaseMode<{}>{
|
||||
@ -115,21 +107,6 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//是否允许攻击
|
||||
isAllowAttack:boolean = false;
|
||||
|
||||
//野怪列表
|
||||
_wildlifes:GOnHookPets;
|
||||
get wildlifes(){
|
||||
//如果没有野怪了 则 向服务器生成
|
||||
if(!this._wildlifes || !(this._wildlifes.pets.length)){
|
||||
//生成
|
||||
this.onSpawnWildlife();
|
||||
return null;
|
||||
}
|
||||
return this._wildlifes;
|
||||
}
|
||||
set wildlifes(data:GOnHookPets){
|
||||
this._wildlifes = data;
|
||||
}
|
||||
|
||||
//添加监听事件
|
||||
addEvent(){
|
||||
app.event.on(PlayerTacticalEvent.UPDATE_TACTICAL,this.onUpdatePlayerPet,this);
|
||||
@ -186,17 +163,6 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
|
||||
}
|
||||
|
||||
//生成野怪
|
||||
onSpawnWildlife(){
|
||||
//获取服务器野怪
|
||||
app.socket.SendBack(GAction.MODE_ON_HOOK_SPAWN_PET,{
|
||||
type:GActionType.GOnHookPets,
|
||||
fun:(info:GOnHookPets) => {
|
||||
this.wildlifes = info;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//更新玩家宠物
|
||||
onUpdatePlayerPet(){
|
||||
//获取玩家阵容
|
||||
@ -205,7 +171,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//移除不再阵容中的宠物
|
||||
let roles = [...this.getOnesRoleAlive(GOnHookModePlayerEnum.PLAYER)]
|
||||
roles.forEach(role => {
|
||||
let expand = role.getComponent(GRoleOnHookExpand);
|
||||
let expand = role.getComponent(GRoleOnHookPlayerExpand);
|
||||
//如果宠物不再阵容中 则 移除宠物
|
||||
if(infos.indexOf(expand.petId) < 0){
|
||||
//移除宠物
|
||||
@ -267,7 +233,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//如果场上有这个宠物则更新阵法位置
|
||||
let passRole:GRoleDefault;
|
||||
this.playerRoles.forEach(role => {
|
||||
if(role.getComponent(GRoleOnHookExpand).petId == petId)
|
||||
if(role.getComponent(GRoleOnHookPlayerExpand).petId == petId)
|
||||
passRole = role;
|
||||
})
|
||||
if(passRole){
|
||||
@ -285,10 +251,21 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
}
|
||||
let role = this.onGenRole(GOnHookModePlayerEnum.PLAYER,index,TD.TbGRole.get(info.petTbId));
|
||||
//向宠物添加 OnHook 扩展
|
||||
let expand = role.node.addComponent(GRoleOnHookExpand);
|
||||
let expand = role.node.addComponent(GRoleOnHookPlayerExpand);
|
||||
expand.petId = petId;
|
||||
}
|
||||
|
||||
//生成野怪
|
||||
onGenCreeps(index:number,creeps:GOnHookPet){
|
||||
|
||||
let role = this.onGenRole(GOnHookModePlayerEnum.ENEMY,index,TD.TbGRole.get(creeps.petTbId));
|
||||
|
||||
//向野怪添加扩展
|
||||
let expand = role.node.addComponent(GRoleOnHookCreepsExpand);
|
||||
expand.creeps = creeps;
|
||||
|
||||
}
|
||||
|
||||
//生成宠物
|
||||
onGenRole(type: GOnHookModePlayerEnum,index:number,info:TB.TbGRole):GRoleDefault {
|
||||
|
||||
@ -308,6 +285,8 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
|
||||
//绑定死亡回调
|
||||
entity.addKillBackEvent(this.onRoleKillBack.bind(this))
|
||||
//绑定受击回调
|
||||
entity.addHitCallback(this.onHitBack.bind(this));
|
||||
|
||||
this.addGObject(entity,tactical.getPosition(index));
|
||||
|
||||
@ -364,11 +343,10 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//生成敌人
|
||||
onResetGenerateEnemy(){
|
||||
this.enemyRoles = [];
|
||||
if(!this.wildlifes) return;
|
||||
|
||||
//获取敌人
|
||||
let wildlife = this.wildlifes.pets.shift();
|
||||
this.onGenRole(GOnHookModePlayerEnum.ENEMY,2,GRoleUtil.getGRole(wildlife.petTbId));
|
||||
let creeps = GOnHookManager.getIns().getNextCreeps();
|
||||
if(!creeps) return; //没有获取到野怪则返回
|
||||
this.onGenCreeps(2,creeps);
|
||||
// this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info));
|
||||
}
|
||||
|
||||
@ -380,14 +358,22 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
role.node.destroy()
|
||||
},3000)
|
||||
|
||||
//如果死亡的是野怪则通知野怪死亡
|
||||
if(role.getComponent(GRoleOnHookCreepsExpand)){
|
||||
GOnHookManager.getIns().onKillSreeps(role.getComponent(GRoleOnHookCreepsExpand).creeps);
|
||||
}
|
||||
|
||||
//清理
|
||||
this.onClearCache();
|
||||
|
||||
// //如果没有敌人则生成敌人
|
||||
// if(this.getOnesRole(GOnHookModePlayerEnum.ENEMY).filter(role => !!role.get()).length <= 0){
|
||||
// //生成敌人
|
||||
// this.onResetGenerateEnemy();
|
||||
// }
|
||||
}
|
||||
|
||||
//角色受击回调
|
||||
onHitBack(role:GRoleDefault,hit:number){
|
||||
|
||||
//添加受击显示
|
||||
app.event.emit(ModeRenderEvent.HIT,role,hit);
|
||||
|
||||
}
|
||||
|
||||
//清理缓存
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { app } from "../App";
|
||||
import { GUI } from "../ui/UIConfig";
|
||||
|
||||
const RData = (data:any,isTips:boolean = true) => {
|
||||
//接受到JSON消息
|
||||
export const RData = (data:any,isTips:boolean = true) => {
|
||||
if(data.data.state == 200){
|
||||
return data.data.data;
|
||||
}else{
|
||||
@ -12,6 +13,18 @@ const RData = (data:any,isTips:boolean = true) => {
|
||||
return data.data.data;
|
||||
}
|
||||
}
|
||||
//接受到Protobuf
|
||||
export const RProto = (data:any,type:string) => {
|
||||
|
||||
try{
|
||||
return app.proto
|
||||
.getType(type)
|
||||
.decode(new Uint8Array(data.data)) as any;;
|
||||
}catch{
|
||||
app.layer.Open(GUI.Tips,{text:"Protobuf 解析失败"});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/************** 请求类 *******************/
|
||||
export interface NewsContext{
|
||||
|
14
JisolGameCocos/assets/script/consts/GAPI.ts
Normal file
14
JisolGameCocos/assets/script/consts/GAPI.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { GOnHookPets } from "../../../extensions/ngame/assets/ngame/message/proto";
|
||||
import { app } from "../App";
|
||||
import { PlayerPetOV, RData, RProto } from "./API";
|
||||
import { GActionType } from "./GActionType";
|
||||
|
||||
export const GAPI = {
|
||||
|
||||
/************** 无限模式接口 ********************/
|
||||
//生成野怪
|
||||
GOnHookSpawnCreeps : async () => RProto(await app.api.get(`/game/mode/onHook/onSpawnCreeps`,{responseType:'arraybuffer'}),GActionType.GOnHookPets) as GOnHookPets,
|
||||
//捕捉野怪
|
||||
GOnHookCatchCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onCatchCreeps/${creepId}`)) as PlayerPetOV,
|
||||
|
||||
}
|
9
JisolGameCocos/assets/script/consts/GAPI.ts.meta
Normal file
9
JisolGameCocos/assets/script/consts/GAPI.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4ecc480c-6d05-4b57-bc01-1605ae0c1512",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -8,9 +8,5 @@ export enum GAction {
|
||||
|
||||
|
||||
/*************** 游戏模式 : 无尽模式(OnHook) **************/
|
||||
MODE_ON_HOOK_SPAWN_PET = 3001, //生成宠物
|
||||
MODE_ON_HOOK_CAPTURE_PET = 3002, //捕捉宠物
|
||||
MODE_ON_HOOK_SELL_PET = 3003, //卖出宠物
|
||||
|
||||
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
import { sys } from "cc";
|
||||
import { WorldCanvas } from "../WorldCanvas";
|
||||
|
||||
//UI 动画
|
||||
export enum UIPetAnim{
|
||||
std = "std",
|
||||
}
|
||||
|
||||
//存储Key
|
||||
export enum StorageEnum{
|
||||
|
||||
Token = "Storage_Token", // Token
|
||||
|
||||
}
|
||||
|
||||
export class StorageData {
|
||||
@ -26,10 +27,13 @@ export class StorageData {
|
||||
|
||||
}
|
||||
|
||||
export const GData = {
|
||||
export class GData {
|
||||
//层级
|
||||
layer: {
|
||||
static layer = {
|
||||
World: 1,
|
||||
}
|
||||
};
|
||||
|
||||
//世界画布节点
|
||||
static WorldCanvas: WorldCanvas;
|
||||
}
|
||||
|
||||
|
@ -38,6 +38,11 @@ export default class PlayerPetData extends BaseData{
|
||||
return this.datas.filter(item => item.petId == petId)[0]
|
||||
}
|
||||
|
||||
//添加宠物
|
||||
addPet(pet:PlayerPetOV){
|
||||
this.datas.push(pet);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
9
JisolGameCocos/assets/script/manager/battle.meta
Normal file
9
JisolGameCocos/assets/script/manager/battle.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "d92a44bc-1e3c-44d4-b3e5-a3b2f1324e98",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
9
JisolGameCocos/assets/script/manager/battle/mode.meta
Normal file
9
JisolGameCocos/assets/script/manager/battle/mode.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "ec650551-a3f2-4b5c-a9bb-a4fd649dbdbd",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
import { GOnHookPet } from "../../../../../extensions/ngame/assets/ngame/message/proto";
|
||||
import Singleton from "../../../../../extensions/ngame/assets/ngame/util/Singleton";
|
||||
import { app } from "../../../App";
|
||||
import { PlayerPetOV } from "../../../consts/API";
|
||||
import { GAPI } from "../../../consts/GAPI";
|
||||
import PlayerPetData from "../../../data/PlayerPetData";
|
||||
import { GUI } from "../../../ui/UIConfig";
|
||||
|
||||
export enum GOnHookManagerEvent{
|
||||
//添加死亡野怪
|
||||
ADD_KILL_SREEP = "GOnHookManagerEvent_ADD_KILL_SREEP",
|
||||
//删除死亡野怪
|
||||
DEL_KILL_SREEP = "GOnHookManagerEvent_DEL_KILL_SREEP"
|
||||
}
|
||||
|
||||
//游戏模式 OnHook 管理器
|
||||
export default class GOnHookManager extends Singleton{
|
||||
|
||||
//野怪列表
|
||||
_sreeps:Map<string,GOnHookPet> = new Map();
|
||||
get sreeps(){
|
||||
//如果没有野怪了 则 向服务器生成
|
||||
if(!this._sreeps || !(this._sreeps.size)){
|
||||
//生成
|
||||
this.onSpawnSreeps();
|
||||
return null;
|
||||
}
|
||||
return this._sreeps;
|
||||
}
|
||||
set sreeps(data:Map<string,GOnHookPet>){
|
||||
this._sreeps = data;
|
||||
}
|
||||
|
||||
//已经死亡的野怪列表
|
||||
killSreeps:GOnHookPet[] = [];
|
||||
|
||||
|
||||
//生成野怪
|
||||
onSpawnSreeps(){
|
||||
GAPI.GOnHookSpawnCreeps().then(data => {
|
||||
data.pets.forEach(pet => {
|
||||
this._sreeps.set(pet.key,pet as GOnHookPet);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
//获取下一只野怪
|
||||
getNextCreeps(){
|
||||
if(!this.sreeps) return;
|
||||
let creeps = this.sreeps.get(this.sreeps.keys().next()?.value)
|
||||
return creeps;
|
||||
}
|
||||
|
||||
//野怪死亡
|
||||
onKillSreeps(creeps:GOnHookPet){
|
||||
|
||||
this.sreeps.delete(creeps.key);
|
||||
//记入死亡
|
||||
//判断是否在死亡中如果在则跳出
|
||||
if(this.killSreeps.indexOf(creeps) > -1){
|
||||
return;
|
||||
}
|
||||
this.killSreeps.push(creeps);
|
||||
|
||||
//通知添加死亡野怪
|
||||
app.event.emit(GOnHookManagerEvent.ADD_KILL_SREEP,creeps);
|
||||
|
||||
console.log(`GOnHookManager : ${creeps.key} 宠物死亡 可进行捕捉 出售`);
|
||||
|
||||
}
|
||||
|
||||
//捕捉野怪
|
||||
async onCatchCreeps(creeps:GOnHookPet):Promise<boolean>{
|
||||
|
||||
let index;
|
||||
if((index = this.killSreeps.indexOf(creeps)) < 0){
|
||||
app.layer.Open(GUI.Tips,{text:"不可捕捉该宠物"});
|
||||
return false;
|
||||
}
|
||||
|
||||
//删除
|
||||
this.killSreeps.splice(index,1);
|
||||
|
||||
//通知添加野怪被删除
|
||||
app.event.emit(GOnHookManagerEvent.DEL_KILL_SREEP,creeps);
|
||||
|
||||
let pet:PlayerPetOV = await GAPI.GOnHookCatchCreeps(creeps.key);
|
||||
|
||||
//保存宠物
|
||||
if(pet){
|
||||
PlayerPetData.getIns().addPet(pet);
|
||||
}
|
||||
|
||||
return !!pet;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3e881d0a-dd68-4ca6-9043-73e2d45318bd",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
9
JisolGameCocos/assets/script/ui/Consts/Game.meta
Normal file
9
JisolGameCocos/assets/script/ui/Consts/Game.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "a0bd4b57-3c54-4d36-a0b5-20728f53f17b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
54
JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts
Normal file
54
JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { app } from '../../../App';
|
||||
import GRoleDefault from '../../../battle/base/role/GRoleDefault';
|
||||
import { GData } from '../../../consts/GData';
|
||||
import { v2 } from 'cc';
|
||||
import { Prefab } from 'cc';
|
||||
import { instantiate } from 'cc';
|
||||
import { v3 } from 'cc';
|
||||
import { ModeRenderHitText } from './ModeRenderHitText';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export enum ModeRenderEvent{
|
||||
//受击
|
||||
HIT = "ModeRenderEvent_HIT"
|
||||
}
|
||||
|
||||
@ccclass('ModeRender')
|
||||
export class ModeRender extends Component {
|
||||
|
||||
//受击预制体
|
||||
@property(Prefab)
|
||||
hitPrefab:Prefab;
|
||||
|
||||
onLoad(){
|
||||
|
||||
app.event.on(ModeRenderEvent.HIT,this.onHit,this);
|
||||
|
||||
}
|
||||
|
||||
protected onDestroy(): void {
|
||||
|
||||
app.event.off(ModeRenderEvent.HIT,this.onHit,this);
|
||||
|
||||
}
|
||||
|
||||
//受击
|
||||
onHit(role:GRoleDefault,hit:number){
|
||||
|
||||
if(!role.get()) return;
|
||||
|
||||
let rolePos = GData.WorldCanvas.camera.worldToScreen(role.node.worldPosition);
|
||||
|
||||
let hitNode = instantiate(this.hitPrefab);
|
||||
|
||||
this.node.addChild(hitNode);
|
||||
hitNode.position = rolePos.add(v3(0,100,0));
|
||||
|
||||
hitNode.getComponent(ModeRenderHitText).setText(hit);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "00e93335-8301-435f-83b1-b83f29e48e8b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
import { tween } from 'cc';
|
||||
import { v3 } from 'cc';
|
||||
import { Label } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ModeRenderHitText')
|
||||
export class ModeRenderHitText extends Component {
|
||||
|
||||
@property(Label)
|
||||
hitLabel:Label;
|
||||
|
||||
setText(hit:number){
|
||||
|
||||
this.hitLabel.string = `${hit}`;
|
||||
|
||||
this.setAnimation();
|
||||
|
||||
}
|
||||
|
||||
//设置动画
|
||||
setAnimation(){
|
||||
|
||||
this.node.scale = v3(0,0,0);
|
||||
|
||||
tween(this.node)
|
||||
.to(.5,{position:this.node.position.clone().add(v3(0,100,0)),scale:v3(1,1,1)},{
|
||||
onComplete:() => {
|
||||
this.node.destroy();
|
||||
},
|
||||
easing:"quadInOut"
|
||||
})
|
||||
.start();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "fad17282-4ea6-418f-89c6-09bff1b47c62",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
24
JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts
Normal file
24
JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { sp } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { app } from '../../../App';
|
||||
import { UIPetAnim } from '../../../consts/GData';
|
||||
import { v3 } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PetIcon')
|
||||
export class PetIcon extends Component {
|
||||
|
||||
@property(sp.Skeleton)
|
||||
spine:sp.Skeleton;
|
||||
|
||||
//设置icon
|
||||
setIcon(petTbId:number){
|
||||
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[petTbId];
|
||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b380916e-5ab8-41da-8bc4-08376a3133ac",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
62
JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts
Normal file
62
JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { PetIcon } from './PetIcon';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PetIconSelect')
|
||||
export class PetIconSelect extends Component {
|
||||
|
||||
@property(PetIcon)
|
||||
petIcon:PetIcon;
|
||||
|
||||
//选中节点
|
||||
@property(Node)
|
||||
select:Node;
|
||||
|
||||
//不可选中节点
|
||||
@property(Node)
|
||||
noselect:Node;
|
||||
|
||||
//是否被选中
|
||||
_isSelect:boolean = false;
|
||||
get isSelect(){
|
||||
return this._isSelect;
|
||||
}
|
||||
set isSelect(data:boolean){
|
||||
this._isSelect = data;
|
||||
this.onUpdateSelect();
|
||||
}
|
||||
|
||||
//是否不可选中
|
||||
_isNoSelect:boolean = false;
|
||||
get isNoSelect(){
|
||||
return this._isNoSelect;
|
||||
}
|
||||
set isNoSelect(data:boolean){
|
||||
this._isNoSelect = data;
|
||||
this.onUpdateSelect();
|
||||
}
|
||||
|
||||
onLoad(){
|
||||
this.onUpdateSelect();
|
||||
this.noselect.active = false;
|
||||
this.select.active = false;
|
||||
}
|
||||
|
||||
|
||||
//设置icon
|
||||
setIcon(petTbId:number){
|
||||
|
||||
this.petIcon.setIcon(petTbId);
|
||||
|
||||
}
|
||||
|
||||
onUpdateSelect(){
|
||||
|
||||
this.select.active = this.isSelect;
|
||||
this.noselect.active = this.isNoSelect;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7c6657dc-bcb4-460e-ace3-860bd4238a0d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -24,6 +24,7 @@ export class MainView extends JNGLayerBase {
|
||||
});
|
||||
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
//更新UI界面
|
||||
|
9
JisolGameCocos/assets/script/ui/Home/Sreeps.meta
Normal file
9
JisolGameCocos/assets/script/ui/Home/Sreeps.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "45b68a51-740e-4ff5-91b1-ba79c76ede3d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNScrollViewItem from '../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { GOnHookPet } from '../../../../../extensions/ngame/assets/ngame/message/proto';
|
||||
import { PetIcon } from '../../Consts/Pet/PetIcon';
|
||||
import { PetIconSelect } from '../../Consts/Pet/PetIconSelect';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainSreepsIcon')
|
||||
export class MainSreepsIcon extends JNScrollViewItem<GOnHookPet> {
|
||||
|
||||
@property(PetIconSelect)
|
||||
icon:PetIconSelect;
|
||||
|
||||
start(){
|
||||
this.icon.setIcon(this.data.petTbId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "590f92c6-d3f3-4143-9de4-e47a1257257a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNScrollView from '../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||
import { app } from '../../../App';
|
||||
import GOnHookManager, { GOnHookManagerEvent } from '../../../manager/battle/mode/GOnHookManager';
|
||||
import { GOnHookPet } from '../../../../../extensions/ngame/assets/ngame/message/proto';
|
||||
import { MainSreepsIcon } from './MainSreepsIcon';
|
||||
import { NodeEventType } from 'cc';
|
||||
import { GUI } from '../../UIConfig';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainSreepsList')
|
||||
export class MainSreepsList extends Component {
|
||||
|
||||
//野怪列表
|
||||
@property(JNScrollView)
|
||||
views:JNScrollView;
|
||||
|
||||
//默认选择
|
||||
index:number = 0;
|
||||
|
||||
onLoad(){
|
||||
|
||||
//监听 野怪死亡
|
||||
app.event.on(GOnHookManagerEvent.ADD_KILL_SREEP,this.onAddSreep,this);
|
||||
//监听 野怪删除
|
||||
app.event.on(GOnHookManagerEvent.DEL_KILL_SREEP,this.onDelSreep,this);
|
||||
|
||||
//添加子节点事件
|
||||
this.views.addItemEvent(NodeEventType.TOUCH_END,this.onClickItem.bind(this));
|
||||
|
||||
}
|
||||
|
||||
protected onDestroy(): void {
|
||||
|
||||
//取消监听
|
||||
app.event.off(GOnHookManagerEvent.ADD_KILL_SREEP,this.onAddSreep,this);
|
||||
app.event.on(GOnHookManagerEvent.DEL_KILL_SREEP,this.onDelSreep,this);
|
||||
}
|
||||
|
||||
|
||||
//添加野怪
|
||||
onAddSreep(sreep:GOnHookPet){
|
||||
this.views.addData(sreep);
|
||||
}
|
||||
|
||||
//删除野怪
|
||||
onDelSreep(sreep:GOnHookPet){
|
||||
this.views.delData(sreep);
|
||||
}
|
||||
|
||||
//刷新
|
||||
onUpdateView(){
|
||||
|
||||
let items = this.views.getItems<MainSreepsIcon>();
|
||||
|
||||
if(items.length <= 0) return;
|
||||
|
||||
//取消选中
|
||||
items.forEach(item => item.icon.isSelect = false)
|
||||
|
||||
//选中index
|
||||
if(items[this.index]) items[this.index].icon.isSelect = true;
|
||||
|
||||
}
|
||||
|
||||
//点击子节点
|
||||
onClickItem(index:number){
|
||||
|
||||
this.index = index;
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
//捕捉野怪
|
||||
async onClickCatch(){
|
||||
|
||||
//获取选中的野怪
|
||||
let item = this.views.getItems<MainSreepsIcon>()[this.index];
|
||||
|
||||
if(!item){
|
||||
app.layer.Open(GUI.Tips,{text:"请选择需要捕捉的宠物"});
|
||||
return;
|
||||
}
|
||||
|
||||
if(await GOnHookManager.getIns().onCatchCreeps(item.data))
|
||||
app.layer.Open(GUI.Tips,{text:"捕捉成功!"});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "fe2ad307-ecc6-45e4-a5e0-4782b0bf0257",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@ -1,50 +1,17 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNScrollViewItem from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { PlayerPetOV } from '../../consts/API';
|
||||
import { sp } from 'cc';
|
||||
import { app } from '../../App';
|
||||
import { UIPetAnim } from '../../consts/GData';
|
||||
import JNScrollViewItem from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { PetIconSelect } from '../Consts/Pet/PetIconSelect';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('IntoBattlePetIcon')
|
||||
export class IntoBattlePetIcon extends JNScrollViewItem<PlayerPetOV> {
|
||||
|
||||
@property(sp.Skeleton)
|
||||
spine:sp.Skeleton;
|
||||
|
||||
//选中节点
|
||||
@property(Node)
|
||||
select:Node;
|
||||
|
||||
//不可选中节点
|
||||
@property(Node)
|
||||
noselect:Node;
|
||||
|
||||
//是否被选中
|
||||
isSelect:boolean = false;
|
||||
|
||||
//是否不可选中
|
||||
isNoSelect:boolean = false;
|
||||
|
||||
onLoad(){
|
||||
this.onUpdateSelect();
|
||||
this.noselect.active = false;
|
||||
this.select.active = false;
|
||||
}
|
||||
|
||||
start(): void {
|
||||
|
||||
//显示角色
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[this.data.petTbId];
|
||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||
|
||||
}
|
||||
|
||||
onUpdateSelect(){
|
||||
|
||||
this.select.active = this.isSelect;
|
||||
this.noselect.active = this.isNoSelect;
|
||||
@property(PetIconSelect)
|
||||
select:PetIconSelect;
|
||||
|
||||
protected start(): void {
|
||||
this.select.setIcon(this.data.petTbId);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7c6657dc-bcb4-460e-ace3-860bd4238a0d",
|
||||
"uuid": "0d7f0c4b-80b2-49fb-baab-f4c7131b9dda",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
|
@ -21,9 +21,6 @@ export class IntoBattleView extends JNLayerBase {
|
||||
@property(JNScrollView)
|
||||
views:JNScrollView; //宠物列表
|
||||
|
||||
@property(Prefab)
|
||||
petIconPrefab; //宠物Icon预制体
|
||||
|
||||
@property(sp.Skeleton)
|
||||
spine:sp.Skeleton; //当前选中的宠物
|
||||
|
||||
@ -58,7 +55,7 @@ export class IntoBattleView extends JNLayerBase {
|
||||
//设置不可选中
|
||||
this.views.getItems<IntoBattlePetIcon>().forEach(item => {
|
||||
if(PlayerTacticalData.getIns().getTacticalInfo().indexOf(item.data.petId) != -1)
|
||||
item.isNoSelect = true; //如果在阵法里则不可选中
|
||||
item.select.isNoSelect = true; //如果在阵法里则不可选中
|
||||
})
|
||||
|
||||
//向子节点添加点击事件
|
||||
@ -73,15 +70,13 @@ export class IntoBattleView extends JNLayerBase {
|
||||
|
||||
//默认都不选中
|
||||
this.views.getItems<IntoBattlePetIcon>().forEach(item => {
|
||||
item.isSelect = false;
|
||||
item.onUpdateSelect();
|
||||
item.select.isSelect = false;
|
||||
})
|
||||
|
||||
//设置选中
|
||||
if(this.index != -1){
|
||||
let current = this.views.getItems<IntoBattlePetIcon>()[this.index]
|
||||
current.isSelect = true;
|
||||
current.onUpdateSelect();
|
||||
current.select.isSelect = true;
|
||||
|
||||
//显示选中宠物
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[this.pets[this.index].petTbId];
|
||||
@ -94,7 +89,7 @@ export class IntoBattleView extends JNLayerBase {
|
||||
onClickItem(index:number){
|
||||
|
||||
//判断是否不可选中
|
||||
if(this.views.getItems<IntoBattlePetIcon>()[index].isNoSelect) {
|
||||
if(this.views.getItems<IntoBattlePetIcon>()[index].select.isNoSelect) {
|
||||
app.layer.Open(GUI.Tips,{text:"当前宠物已上阵"})
|
||||
return;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ea12e2c1097c07ed71baf59504455038e3b0b856
|
||||
Subproject commit 1943c6992fd3f7269e7a08b174cdf5e49028c074
|
@ -8,9 +8,4 @@ public interface GActionEnum {
|
||||
int CHAT_MESSAGE = 2001; //发送聊天消息
|
||||
int CHAT_RECEIVE_MESSAGE = 2002; //接受聊天消息
|
||||
|
||||
/*************** 游戏模式 : 无尽模式(OnHook) **************/
|
||||
int MODE_ON_HOOK_SPAWN_PET = 3001; //生成宠物
|
||||
int MODE_ON_HOOK_CAPTURE_PET = 3002; //捕捉宠物
|
||||
int MODE_ON_HOOK_SELL_PET = 3003; //卖出宠物
|
||||
|
||||
}
|
||||
|
@ -1,66 +1,9 @@
|
||||
package cn.jisol.game.actions.onhook;
|
||||
|
||||
import cfg.TB.TbGRole;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.jisol.game.actions.GActionEnum;
|
||||
import cn.jisol.game.data.GlobalIds;
|
||||
import cn.jisol.game.data.TD;
|
||||
import cn.jisol.game.network.client.GClient;
|
||||
import cn.jisol.game.proto.GOnHookMessage;
|
||||
import cn.jisol.ngame.actions.core.NAction;
|
||||
import cn.jisol.ngame.actions.core.NActionMethod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
//无尽模式
|
||||
@NAction
|
||||
public class GOnHookAction {
|
||||
|
||||
//生成的宠物列表
|
||||
public static Map<Long,Map<String, GOnHookMessage.GOnHookPet>> PETS = new HashMap<>();
|
||||
|
||||
//生成宠物 返回生成好的列表
|
||||
@NActionMethod(GActionEnum.MODE_ON_HOOK_SPAWN_PET)
|
||||
public static GOnHookMessage.GOnHookPets onSpawnPet(GClient client){
|
||||
|
||||
//获取玩家生成的宠物
|
||||
Map<String, GOnHookMessage.GOnHookPet> pets = PETS.get(client.player.getPlayerId());
|
||||
|
||||
//如果没有则生成类
|
||||
if(Objects.isNull(pets)){
|
||||
PETS.put(client.player.getPlayerId(),pets = new HashMap<>());
|
||||
}
|
||||
|
||||
//获取可生成的最大数量
|
||||
int max = Integer.parseInt(TD.DATA.getTbGOnHookGlobal().get(GlobalIds.MODE_ON_HOOK_SPAWN_NUM).args);
|
||||
|
||||
//获取配置表全部宠物
|
||||
ArrayList<TbGRole> tdPets = TD.DATA.getTbGRole().getDataList();
|
||||
|
||||
//如果小于最大数量则生成
|
||||
while (pets.size() < max){
|
||||
|
||||
//目前随机生成宠物
|
||||
GOnHookMessage.GOnHookPet hookPet = GOnHookMessage.GOnHookPet.newBuilder()
|
||||
//生成唯一Id
|
||||
.setKey(RandomUtil.randomString(8))
|
||||
//随机取配置表宠物中的宠物
|
||||
.setPetTbId(tdPets.get(RandomUtil.randomInt(0, tdPets.size() - 1)).id)
|
||||
.build();
|
||||
|
||||
//添加到宠物列表中
|
||||
pets.put(hookPet.getKey(),hookPet);
|
||||
|
||||
}
|
||||
|
||||
//返回生成好的宠物
|
||||
return GOnHookMessage.GOnHookPets.newBuilder().addAllPets(pets.values()).build();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,122 @@
|
||||
package cn.jisol.game.controller.game.mode;
|
||||
|
||||
import cfg.TB.TbGRole;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.jisol.game.controller.argsresolver.CurrentPlayer;
|
||||
import cn.jisol.game.data.GlobalIds;
|
||||
import cn.jisol.game.data.TD;
|
||||
import cn.jisol.game.entity.game.Player;
|
||||
import cn.jisol.game.entity.game.PlayerPet;
|
||||
import cn.jisol.game.proto.GOnHookMessage;
|
||||
import cn.jisol.game.service.PlayerPetService;
|
||||
import cn.jisol.ngame.util.NewsContext;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Api(value = "JNGameDemo - API", tags = {"无尽模式 - API"})
|
||||
@RestController
|
||||
@RequestMapping("/game/mode/onhook")
|
||||
@RequestMapping("/game/mode/onHook")
|
||||
@ResponseBody
|
||||
public class GOnHookController {
|
||||
|
||||
@Autowired
|
||||
PlayerPetService playerPetService;
|
||||
|
||||
//生成的野怪列表
|
||||
public static Map<Long, Map<String, GOnHookMessage.GOnHookPet>> CREEPS = new HashMap<>();
|
||||
|
||||
//生成野怪
|
||||
@ApiImplicitParams({})
|
||||
@ApiOperation(value = "生成野怪")
|
||||
@GetMapping("/onSpawnCreeps")
|
||||
public ResponseEntity<byte[]> onSpawnCreeps(@CurrentPlayer Player player){
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Content-Type", "application/json");
|
||||
|
||||
//获取玩家生成的宠物
|
||||
Map<String, GOnHookMessage.GOnHookPet> creeps = CREEPS.get(player.getPlayerId());
|
||||
|
||||
//如果没有则生成类
|
||||
if(Objects.isNull(creeps)){
|
||||
CREEPS.put(player.getPlayerId(),creeps = new HashMap<>());
|
||||
}
|
||||
|
||||
//获取可生成的最大数量
|
||||
int max = Integer.parseInt(TD.DATA.getTbGOnHookGlobal().get(GlobalIds.MODE_ON_HOOK_SPAWN_NUM).args);
|
||||
|
||||
//获取配置表全部宠物
|
||||
ArrayList<TbGRole> tdPets = TD.DATA.getTbGRole().getDataList();
|
||||
|
||||
//如果小于最大数量则生成
|
||||
while (creeps.size() < max){
|
||||
|
||||
//目前随机生成宠物
|
||||
GOnHookMessage.GOnHookPet hookPet = GOnHookMessage.GOnHookPet.newBuilder()
|
||||
//生成唯一Id
|
||||
.setKey(RandomUtil.randomString(8))
|
||||
//随机取配置表宠物中的宠物
|
||||
.setPetTbId(tdPets.get(RandomUtil.randomInt(0, tdPets.size())).id)
|
||||
.build();
|
||||
|
||||
//添加到宠物列表中
|
||||
creeps.put(hookPet.getKey(),hookPet);
|
||||
|
||||
}
|
||||
|
||||
//返回生成好的宠物
|
||||
return ResponseEntity.ok().headers(headers).body(GOnHookMessage.GOnHookPets.newBuilder().addAllPets(creeps.values()).build().toByteArray());
|
||||
}
|
||||
|
||||
//出售野怪
|
||||
@ApiImplicitParams({})
|
||||
@ApiOperation(value = "出售野怪")
|
||||
@PostMapping("/onSellCreeps/{creepId}")
|
||||
public NewsContext<Boolean> onSellCreeps(@PathVariable String creepId){
|
||||
return NewsContext.onSuccess("卖出成功");
|
||||
}
|
||||
|
||||
//捕捉野怪
|
||||
@ApiImplicitParams({})
|
||||
@ApiOperation(value = "捕捉野怪")
|
||||
@PostMapping("/onCatchCreeps/{creepId}")
|
||||
public NewsContext<PlayerPet> onCatchCreeps(@PathVariable String creepId,@CurrentPlayer Player player){
|
||||
|
||||
//(目前测试阶段 捕捉概率 100%)
|
||||
|
||||
//获取玩家生成的野怪
|
||||
Map<String, GOnHookMessage.GOnHookPet> creeps = CREEPS.get(player.getPlayerId());
|
||||
|
||||
//如果没有则生成类
|
||||
if(Objects.isNull(creeps)){
|
||||
CREEPS.put(player.getPlayerId(),creeps = new HashMap<>());
|
||||
return NewsContext.onFail("捕捉失败");
|
||||
}
|
||||
|
||||
GOnHookMessage.GOnHookPet onHookPet;
|
||||
if(Objects.isNull(onHookPet = creeps.remove(creepId))){
|
||||
return NewsContext.onFail("捕捉失败");
|
||||
}
|
||||
|
||||
//捕捉
|
||||
PlayerPet pet = PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(onHookPet.getPetTbId()).petGrade(0).build();
|
||||
if(playerPetService.save(pet)){
|
||||
return NewsContext.onSuccess("捕捉成功",pet);
|
||||
}else{
|
||||
return NewsContext.onFail("捕捉失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user