宠物上阵

This commit is contained in:
DESKTOP-5RP3AKU\Jisol 2023-11-16 02:44:43 +08:00
parent 391ce959cb
commit 1683ec01a0
27 changed files with 5227 additions and 187 deletions

View File

@ -25,17 +25,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 137 "__id__": 147
}, },
{ {
"__id__": 139 "__id__": 149
}, },
{ {
"__id__": 141 "__id__": 151
} }
], ],
"_prefab": { "_prefab": {
"__id__": 143 "__id__": 153
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -79,23 +79,23 @@
"__id__": 3 "__id__": 3
}, },
{ {
"__id__": 81 "__id__": 91
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 130 "__id__": 140
}, },
{ {
"__id__": 132 "__id__": 142
}, },
{ {
"__id__": 134 "__id__": 144
} }
], ],
"_prefab": { "_prefab": {
"__id__": 136 "__id__": 146
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -142,14 +142,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 76 "__id__": 86
}, },
{ {
"__id__": 78 "__id__": 88
} }
], ],
"_prefab": { "_prefab": {
"__id__": 80 "__id__": 90
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -199,23 +199,23 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 67 "__id__": 77
}, },
{ {
"__id__": 69 "__id__": 79
}, },
{ {
"__id__": 20 "__id__": 20
}, },
{ {
"__id__": 71 "__id__": 81
}, },
{ {
"__id__": 73 "__id__": 83
} }
], ],
"_prefab": { "_prefab": {
"__id__": 75 "__id__": 85
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -275,7 +275,7 @@
} }
], ],
"_prefab": { "_prefab": {
"__id__": 66 "__id__": 76
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -628,24 +628,27 @@
}, },
{ {
"__id__": 51 "__id__": 51
},
{
"__id__": 61
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 61 "__id__": 71
}, },
{ {
"__id__": 63 "__id__": 73
} }
], ],
"_prefab": { "_prefab": {
"__id__": 65 "__id__": 75
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": -390, "y": -389.442,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@ -904,7 +907,7 @@
}, },
{ {
"__type__": "cc.PrefabInstance", "__type__": "cc.PrefabInstance",
"fileId": "88VLo/6FxGso1Xk2TLIXCi", "fileId": "8eTuYnSCxCr56XNF4GpS6i",
"prefabRootNode": { "prefabRootNode": {
"__id__": 1 "__id__": 1
}, },
@ -953,7 +956,7 @@
"value": { "value": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 100.79999999999998, "y": 151.2,
"z": 0 "z": 0
} }
}, },
@ -1016,7 +1019,7 @@
}, },
{ {
"__type__": "cc.PrefabInstance", "__type__": "cc.PrefabInstance",
"fileId": "b2m3yUp99HMqmUHFd9+in0", "fileId": "1fY2+C9iBKNJ2LaUt68EGJ",
"prefabRootNode": { "prefabRootNode": {
"__id__": 1 "__id__": 1
}, },
@ -1068,7 +1071,7 @@
"value": { "value": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 50.399999999999984, "y": 100.79999999999998,
"z": 0 "z": 0
} }
}, },
@ -1111,7 +1114,7 @@
"propertyPath": [ "propertyPath": [
"_string" "_string"
], ],
"value": "ScrollView content02" "value": "ScrollView content011"
}, },
{ {
"__type__": "cc.TargetInfo", "__type__": "cc.TargetInfo",
@ -1147,7 +1150,7 @@
}, },
{ {
"__type__": "cc.PrefabInstance", "__type__": "cc.PrefabInstance",
"fileId": "c1q9+5/s5Erplsdy7A2eT0", "fileId": "88HpHhoQ9Ii71ZbV+uGFUI",
"prefabRootNode": { "prefabRootNode": {
"__id__": 1 "__id__": 1
}, },
@ -1199,7 +1202,7 @@
"value": { "value": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": -1.4210854715202004e-14, "y": 50.399999999999984,
"z": 0 "z": 0
} }
}, },
@ -1242,7 +1245,138 @@
"propertyPath": [ "propertyPath": [
"_string" "_string"
], ],
"value": "ScrollView content03" "value": "ScrollView content011"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"7ahEvd3z5N4ruHsPPLIdmV"
]
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_prefab": {
"__id__": 62
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 61
},
"asset": {
"__uuid__": "da561b68-57fb-462b-b799-da2ba6658534",
"__expectedType__": "cc.Prefab"
},
"fileId": "b4aPDEneNHC4OYnY3k7ypP",
"instance": {
"__id__": 63
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "aaTm0EZxBOhZRXlrwNOuyK",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 64
},
{
"__id__": 66
},
{
"__id__": 67
},
{
"__id__": 68
},
{
"__id__": 69
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 65
},
"propertyPath": [
"_name"
],
"value": "MainChatItem-003"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"b4aPDEneNHC4OYnY3k7ypP"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 65
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": -1.4210854715202004e-14,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 65
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 65
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 70
},
"propertyPath": [
"_string"
],
"value": "ScrollView content011"
}, },
{ {
"__type__": "cc.TargetInfo", "__type__": "cc.TargetInfo",
@ -1260,12 +1394,12 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 62 "__id__": 72
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 720, "width": 720,
"height": 151.2 "height": 201.6
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -1288,7 +1422,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 64 "__id__": 74
}, },
"_resizeMode": 1, "_resizeMode": 1,
"_layoutType": 2, "_layoutType": 2,
@ -1352,7 +1486,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 68 "__id__": 78
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1380,7 +1514,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 70 "__id__": 80
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1425,7 +1559,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 72 "__id__": 82
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -1461,7 +1595,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 74 "__id__": 84
}, },
"view": { "view": {
"__id__": 24 "__id__": 24
@ -1498,7 +1632,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 77 "__id__": 87
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1526,7 +1660,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 79 "__id__": 89
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -1575,26 +1709,26 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 82 "__id__": 92
}, },
{ {
"__id__": 104 "__id__": 114
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 123 "__id__": 133
}, },
{ {
"__id__": 125 "__id__": 135
}, },
{ {
"__id__": 127 "__id__": 137
} }
], ],
"_prefab": { "_prefab": {
"__id__": 129 "__id__": 139
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1631,33 +1765,33 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 81 "__id__": 91
}, },
"_children": [ "_children": [
{ {
"__id__": 83 "__id__": 93
}, },
{ {
"__id__": 89 "__id__": 99
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 95 "__id__": 105
}, },
{ {
"__id__": 97 "__id__": 107
}, },
{ {
"__id__": 99 "__id__": 109
}, },
{ {
"__id__": 101 "__id__": 111
} }
], ],
"_prefab": { "_prefab": {
"__id__": 103 "__id__": 113
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1694,20 +1828,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 82 "__id__": 92
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 84 "__id__": 94
}, },
{ {
"__id__": 86 "__id__": 96
} }
], ],
"_prefab": { "_prefab": {
"__id__": 88 "__id__": 98
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1744,11 +1878,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 83 "__id__": 93
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 85 "__id__": 95
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1772,11 +1906,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 83 "__id__": 93
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 87 "__id__": 97
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1830,20 +1964,20 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 82 "__id__": 92
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 90 "__id__": 100
}, },
{ {
"__id__": 92 "__id__": 102
} }
], ],
"_prefab": { "_prefab": {
"__id__": 94 "__id__": 104
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1880,11 +2014,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 89 "__id__": 99
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 91 "__id__": 101
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1908,11 +2042,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 89 "__id__": 99
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 93 "__id__": 103
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1966,11 +2100,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 82 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 96 "__id__": 106
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1994,11 +2128,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 82 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 98 "__id__": 108
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2039,21 +2173,21 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 82 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 100 "__id__": 110
}, },
"editingDidBegan": [], "editingDidBegan": [],
"textChanged": [], "textChanged": [],
"editingDidEnded": [], "editingDidEnded": [],
"editingReturn": [], "editingReturn": [],
"_textLabel": { "_textLabel": {
"__id__": 86 "__id__": 96
}, },
"_placeholderLabel": { "_placeholderLabel": {
"__id__": 92 "__id__": 102
}, },
"_returnType": 0, "_returnType": 0,
"_string": "", "_string": "",
@ -2077,11 +2211,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 82 "__id__": 92
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 102 "__id__": 112
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -2126,30 +2260,30 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 81 "__id__": 91
}, },
"_children": [ "_children": [
{ {
"__id__": 105 "__id__": 115
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 113 "__id__": 123
}, },
{ {
"__id__": 115 "__id__": 125
}, },
{ {
"__id__": 117 "__id__": 127
}, },
{ {
"__id__": 120 "__id__": 130
} }
], ],
"_prefab": { "_prefab": {
"__id__": 122 "__id__": 132
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -2186,23 +2320,23 @@
"_objFlags": 512, "_objFlags": 512,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
"__id__": 104 "__id__": 114
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 106 "__id__": 116
}, },
{ {
"__id__": 108 "__id__": 118
}, },
{ {
"__id__": 110 "__id__": 120
} }
], ],
"_prefab": { "_prefab": {
"__id__": 112 "__id__": 122
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -2239,11 +2373,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 105 "__id__": 115
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 107 "__id__": 117
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2267,11 +2401,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 105 "__id__": 115
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 109 "__id__": 119
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2312,11 +2446,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 105 "__id__": 115
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 111 "__id__": 121
}, },
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
@ -2351,11 +2485,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 104 "__id__": 114
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 114 "__id__": 124
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2379,11 +2513,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 104 "__id__": 114
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 116 "__id__": 126
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2424,15 +2558,15 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 104 "__id__": 114
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 118 "__id__": 128
}, },
"clickEvents": [ "clickEvents": [
{ {
"__id__": 119 "__id__": 129
} }
], ],
"_interactable": true, "_interactable": true,
@ -2484,7 +2618,7 @@
"_duration": 0.1, "_duration": 0.1,
"_zoomScale": 1.2, "_zoomScale": 1.2,
"_target": { "_target": {
"__id__": 104 "__id__": 114
}, },
"_id": "" "_id": ""
}, },
@ -2508,11 +2642,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 104 "__id__": 114
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 121 "__id__": 131
}, },
"_alignFlags": 32, "_alignFlags": 32,
"_target": null, "_target": null,
@ -2557,11 +2691,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 81 "__id__": 91
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 124 "__id__": 134
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2585,11 +2719,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 81 "__id__": 91
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 126 "__id__": 136
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2630,11 +2764,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 81 "__id__": 91
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 128 "__id__": 138
}, },
"_alignFlags": 44, "_alignFlags": 44,
"_target": null, "_target": null,
@ -2683,7 +2817,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 131 "__id__": 141
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2711,7 +2845,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 133 "__id__": 143
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2756,7 +2890,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 135 "__id__": 145
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -2805,7 +2939,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 138 "__id__": 148
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2833,7 +2967,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 140 "__id__": 150
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -2869,7 +3003,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 142 "__id__": 152
}, },
"mask": true, "mask": true,
"maskOpcity": 80, "maskOpcity": 80,
@ -2882,7 +3016,7 @@
"__expectedType__": "cc.Prefab" "__expectedType__": "cc.Prefab"
}, },
"inputMessage": { "inputMessage": {
"__id__": 99 "__id__": 109
}, },
"_id": "" "_id": ""
}, },
@ -2902,6 +3036,9 @@
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
{
"__id__": 61
},
{ {
"__id__": 51 "__id__": 51
}, },

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "a98921f4-f143-43bb-ad77-c877dbdd4721",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,542 @@
[
{
"__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
},
{
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 20
},
{
"__id__": 22
}
],
"_prefab": {
"__id__": 24
},
"_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": 110,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b4vJnGQvdKv4MXp8xLg6zf"
},
{
"__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": 0,
"g": 0,
"b": 0,
"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": "01wxgAoWhO+qLRM5Jr3rH1"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "fcC3JxewdM1K8tKbhV80+3",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "背景",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_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__": 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": "5dXmPodeBIzK9ZudCJ0lyM"
},
{
"__type__": "cc.Sprite",
"_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
},
"_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__": 15
},
{
"__id__": 17
}
],
"_prefab": {
"__id__": 19
},
"_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__": 14
},
"_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": "e4A0L+eItAaJtEFXgkYXR2"
},
{
"__type__": "sp.Skeleton",
"_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
},
"_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__": 21
},
"_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__": "7c665fcvLRGDqzjhgvUI4oN",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 23
},
"spine": {
"__id__": 17
},
"select": {
"__id__": 2
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d4qo68UJJHyonQhZ4UFX08"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "02c3tqHwFAbp7zhkA22zq9",
"instance": null,
"targetOverrides": null
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "e59969f5-99a0-4259-ba3e-71093a65cfd8",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "宠物ICON"
}
}

View File

@ -56,10 +56,13 @@
}, },
{ {
"__id__": 78 "__id__": 78
},
{
"__id__": 80
} }
], ],
"_prefab": { "_prefab": {
"__id__": 80 "__id__": 82
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1209,6 +1212,24 @@
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "eeTkntCrtDnqlmLBI6ArzH" "fileId": "eeTkntCrtDnqlmLBI6ArzH"
}, },
{
"__type__": "a93723onHFJLq9yzuZv1eBF",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 81
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a79c+1+OJK4o3xwVYpAprQ"
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {

View File

@ -27,21 +27,21 @@
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 18
},
{
"__id__": 20
},
{
"__id__": 22
},
{ {
"__id__": 24 "__id__": 24
},
{
"__id__": 26
},
{
"__id__": 28
},
{
"__id__": 30
} }
], ],
"_prefab": { "_prefab": {
"__id__": 27 "__id__": 33
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -337,15 +337,19 @@
"_parent": { "_parent": {
"__id__": 1 "__id__": 1
}, },
"_children": [], "_children": [
"_active": true,
"_components": [
{ {
"__id__": 15 "__id__": 15
} }
], ],
"_active": true,
"_components": [
{
"__id__": 21
}
],
"_prefab": { "_prefab": {
"__id__": 17 "__id__": 23
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -376,6 +380,140 @@
}, },
"_id": "" "_id": ""
}, },
{
"__type__": "cc.Node",
"_name": "spine",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 14
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
},
{
"__id__": 18
}
],
"_prefab": {
"__id__": 20
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -35.47,
"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__": 15
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "65I6WOBWVCLrW6iywP48T/"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 15
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": null,
"defaultSkin": "",
"defaultAnimation": "",
"_premultipliedAlpha": true,
"_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": "0f1OnVOdxOHpmwVY/VyzDJ"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "76QA5Y2AxFN7Jjq4/IKsPA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@ -386,7 +524,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 16 "__id__": 22
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -427,7 +565,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 19 "__id__": 25
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -455,7 +593,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 21 "__id__": 27
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -500,7 +638,13 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 23 "__id__": 29
},
"noPet": {
"__id__": 2
},
"havePet": {
"__id__": 14
}, },
"_id": "" "_id": ""
}, },
@ -518,15 +662,15 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 25 "__id__": 31
}, },
"clickEvents": [ "clickEvents": [
{ {
"__id__": 26 "__id__": 32
} }
], ],
"_interactable": true, "_interactable": true,
"_transition": 3, "_transition": 0,
"_normalColor": { "_normalColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 255,
@ -566,7 +710,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "efw+0GxCpOZ5ROxDkIQkn1" "fileId": "3bADZ0NEBKT7VejLYWOUff"
}, },
{ {
"__type__": "cc.ClickEvent", "__type__": "cc.ClickEvent",

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "9552f0a3-1ed5-46e4-8d36-07d4a3cbe7f9",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "db69a24b-0109-4e72-9975-7a4e80e86c3e",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "SelectionBox"
}
}

View File

@ -16,7 +16,7 @@ export default class PlayerPetData extends BaseData{
} }
//获取全部宠物 //获取全部宠物
getData(){ getData():PlayerPetOV[]{
return this.datas; return this.datas;
} }
@ -33,6 +33,11 @@ export default class PlayerPetData extends BaseData{
await this.UpdatePlayerPet(); await this.UpdatePlayerPet();
} }
//通过宠物Id找到宠物
petIdQueryPetInfo(petId:number):PlayerPetOV{
return this.datas.filter(item => item.petId == petId)[0]
}
} }

View File

@ -1,6 +1,12 @@
import { app } from "../App";
import { API, PlayerTacticalOV } from "../consts/API"; import { API, PlayerTacticalOV } from "../consts/API";
import BaseData from "./BaseData"; import BaseData from "./BaseData";
export enum PlayerTacticalEvent{
//更新上阵信息
UPDATE_TACTICAL = "PlayerTacticalEvent_UPDATE_TACTICAL"
}
interface PlayerTacticalInfo extends PlayerTacticalOV{ interface PlayerTacticalInfo extends PlayerTacticalOV{
roles:number[], //上阵的宠物顺序 roles:number[], //上阵的宠物顺序
} }
@ -17,9 +23,9 @@ export default class PlayerTacticalData extends BaseData{
} }
//更新阵法信息 //保存阵法信息
async onUpdateInfo(){ onSaveTacticalInfo(ov:PlayerTacticalOV){
let ov = await API.GetPlayerTactical();
if(!ov.tacticalData){ if(!ov.tacticalData){
ov.tacticalData = JSON.stringify(this.getTacticalInfo()); ov.tacticalData = JSON.stringify(this.getTacticalInfo());
} }
@ -27,14 +33,28 @@ export default class PlayerTacticalData extends BaseData{
...ov, ...ov,
roles: JSON.parse(ov.tacticalData), roles: JSON.parse(ov.tacticalData),
} }
//通知阵法信息已更新
app.event.emit(PlayerTacticalEvent.UPDATE_TACTICAL);
}
//更新阵法信息
async onUpdateInfo(){
this.onSaveTacticalInfo(await API.GetPlayerTactical());
} }
//更新上阵 //更新上阵
async UpdateTactical(roles:number[]){ async UpdateTactical(roles:number[]){
this.info.roles = roles; this.info.roles = roles;
this.info.tacticalData = JSON.stringify(this.info.roles); this.info.tacticalData = JSON.stringify(this.info.roles);
//上传到服务器 //上传到服务器 并且保存
await API.SetPlayerTactical(this.info); this.onSaveTacticalInfo(await API.SetPlayerTactical(this.info));
}
//修改指定位置的上阵 上阵下标,上阵的宠物Id
async UpdateIndexTactical(index:number,petId:number){
this.info.roles[index] = petId;
await this.UpdateTactical(this.info.roles);
} }
//获取指定位置 //获取指定位置

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c4c3edaa-a350-4973-8ada-7377cbb0481f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,42 @@
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';
const { ccclass, property } = _decorator;
@ccclass('PetIconItem')
export class PetIconItem extends JNScrollViewItem<PlayerPetOV> {
@property(sp.Skeleton)
spine:sp.Skeleton;
//选中节点
@property(Node)
select:Node;
//是否被选中
isSelect:boolean = false;
onLoad(){
this.onUpdateSelect();
}
start(): void {
//显示角色
this.spine.skeletonData = app.battleRes.roleSpine[this.data.petTbId];
this.spine.setAnimation(0,UIPetAnim.std,true);
}
onUpdateSelect(){
this.select.active = this.isSelect;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7c6657dc-bcb4-460e-ace3-860bd4238a0d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -2,6 +2,9 @@ import { _decorator, Component, Node } from 'cc';
import PlayerTacticalData from '../../../data/PlayerTacticalData'; import PlayerTacticalData from '../../../data/PlayerTacticalData';
import { app } from '../../../App'; import { app } from '../../../App';
import { GUI } from '../../UIConfig'; import { GUI } from '../../UIConfig';
import { sp } from 'cc';
import { UIPetAnim } from '../../../consts/GData';
import PlayerPetData from '../../../data/PlayerPetData';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('PlayerTacticalItem') @ccclass('PlayerTacticalItem')
@ -10,19 +13,75 @@ export class PlayerTacticalItem extends Component {
//阵法的Index; //阵法的Index;
index:number; index:number;
//没有宠物的节点
@property(Node)
noPet:Node;
//有宠物的节点
@property(Node)
havePet:Node;
//当前上阵的宠物
petId:number;
//初始化阵法 //初始化阵法
onInit(index:number){ onInit(index:number){
this.index = index; this.index = index;
} }
protected start(): void {
this.onUpdateView();
}
//更新信息 //更新信息
onUpdateView(){ onUpdateView(){
PlayerTacticalData.getIns().getItem(this.index);
//获取阵法下的宠物
this.petId = PlayerTacticalData.getIns().getItem(this.index);
//如果为0则没有宠物
if(this.petId){
this.havePet.active = true;
this.noPet.active = false;
this.onUpdatePetView();
}else{
this.noPet.active = true;
this.havePet.active = false;
} }
//点击 }
//更新宠物信息
onUpdatePetView(){
let spine = this.havePet.getComponentInChildren(sp.Skeleton);
//获取宠物信息
let info = PlayerPetData.getIns().petIdQueryPetInfo(this.petId);
spine.skeletonData = app.battleRes.roleSpine[info.petTbId];
spine.setAnimation(0,UIPetAnim.std,true);
}
//打开选择阵法宠物
onClick(){ onClick(){
app.layer.Open(GUI.IntoBattleView); //如果没有宠物则弹出选择宠物 负责 删除宠物
if(this.petId){
//移除宠物
//提示是否移除宠物
app.layer.Open(GUI.SelectionBox,{
tigText:"是否移除宠物?",
cancel:()=>{},
confirm:async ()=>{
//移除宠物 (0就是移除)
await PlayerTacticalData.getIns().UpdateIndexTactical(this.index,0);
}
})
}else{
//选择宠物
app.layer.Open(GUI.IntoBattleView,{
index:this.index, //当前选择的阵法下标
});
}
} }
} }

View File

@ -1,5 +1,7 @@
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import { PlayerTacticalItem } from './PlayerTacticalItem'; import { PlayerTacticalItem } from './PlayerTacticalItem';
import { app } from '../../../App';
import { PlayerTacticalEvent } from '../../../data/PlayerTacticalData';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** /**
@ -12,22 +14,42 @@ export class PlayerTacticalView extends Component {
//阵法子节点列表 //阵法子节点列表
items:PlayerTacticalItem[] = []; items:PlayerTacticalItem[] = [];
// onLoad(){ onLoad(){
// //阵法 //阵法
// this.items = this.node.getComponentsInChildren(PlayerTacticalItem); this.items = this.node.getComponentsInChildren(PlayerTacticalItem);
// this.items.forEach((item,index) => item.onInit(index)); this.items.forEach((item,index) => {
item.onInit(index); //初始化阵法下标
});
// this.onUpdateView(); this.onUpdateView();
// } this.onEvent();
// //更新阵法显示 }
// onUpdateView(){
// this.items.forEach(item => { protected onDestroy(): void {
// item.onUpdateView(); this.offEvent();
// }) }
// }
//添加监听
onEvent(){
app.event.on(PlayerTacticalEvent.UPDATE_TACTICAL,this.onUpdateView,this);
}
//移除监听
offEvent(){
app.event.off(PlayerTacticalEvent.UPDATE_TACTICAL,this.onUpdateView,this);
}
//更新阵法显示
onUpdateView(){
this.items.forEach(item => {
item.onUpdateView();
})
}
} }

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "a4864ef2-ad5e-48a7-8882-e5c04a634d81",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,93 @@
import { _decorator, Component, Node } from 'cc';
import JNLayerBase from '../../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
import { Label } from 'cc';
import { Button } from 'cc';
import { app } from '../../../App';
const { ccclass, property } = _decorator;
export interface SelectionBoxInfo{
cancelText?:string, //取消按钮文字
cancel?:Function, //取消事件
confirmText?:string, //确认按钮文字
confirm?:Function, //确认事件
isHideMake?:boolean, //是否隐藏遮罩
isMaskClose?:boolean, //是否点击遮罩关闭
tigText?:string, //提示内容
titleText?:string, //标题内容
}
@ccclass('SelectionBox')
export class SelectionBox extends JNLayerBase {
//标题
@property(Label)
titleLabel:Label;
//提示文字
@property(Label)
tigLabel:Label;
//取消按钮
@property(Button)
cancalBtn:Button;
//确认按钮
@property(Button)
confirmBtn:Button;
//按钮列表
@property(Node)
btns:Node;
data:SelectionBoxInfo;
onJNLoad(data?: SelectionBoxInfo): void {
this.data = data;
//默认不可以
data.isMaskClose = !!data.isMaskClose;
data.tigText = data.tigText || "这是一个提示选择框";
data.titleText = data.titleText || "标 题";
data.cancelText = data.cancelText || "取 消";
data.confirmText = data.confirmText || "确 认";
this.mask = !data.isHideMake;
this.isClickMaskeClose = data.isMaskClose;
this.tigLabel.string = data.tigText;
this.titleLabel.string = data.titleText;
//没有事件则不显示
this.cancalBtn.node.active = !!data.cancel;
this.confirmBtn.node.active = !!data.confirm;
//显示按钮文字
this.cancalBtn.getComponentInChildren(Label).string = data.cancelText;
this.confirmBtn.getComponentInChildren(Label).string = data.confirmText;
//如果都没有则隐藏按钮列表
if(!data.cancel && data.confirm)
this.btns.active = false;
super.onJNLoad();
}
//点击确认
async onClickConfirm(){
this.data.confirm && await this.data.confirm();
//关闭页面
app.layer.CloseNode(this.node);
}
//点击取消
async onClickCancel(){
this.data.cancel && await this.data.cancel();
//关闭页面
app.layer.CloseNode(this.node);
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "637d2a9d-964e-41f2-b96b-2bfd7e7dc686",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,5 +1,16 @@
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase'; import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
import { Prefab } from 'cc';
import PlayerPetData from '../../data/PlayerPetData';
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
import { PetIconItem } from '../Consts/Pet/PetIconItem';
import { NodeEventType } from 'cc';
import { sp } from 'cc';
import { app } from '../../App';
import { PlayerPetOV } from '../../consts/API';
import { UIPetAnim } from '../../consts/GData';
import { GUI } from '../UIConfig';
import PlayerTacticalData from '../../data/PlayerTacticalData';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
//上阵页面 //上阵页面
@ -7,6 +18,95 @@ const { ccclass, property } = _decorator;
export class IntoBattleView extends JNLayerBase { export class IntoBattleView extends JNLayerBase {
@property(JNScrollView)
views:JNScrollView; //宠物列表
@property(Prefab)
petIconPrefab; //宠物Icon预制体
@property(sp.Skeleton)
spine:sp.Skeleton; //当前选中的宠物
//宠物数据
pets:PlayerPetOV[] = [];
//当前选中
index:number = -1;
tIndex:number = -1; //阵法下标
onJNLoad(data: {index}): void {
super.onJNLoad();
//获取传入的下标
this.tIndex = data.index;
console.log("你选择的是",this.tIndex);
this.onUpdateView();
}
//刷新页面
onUpdateView(){
//获取所有玩家宠物
this.pets = PlayerPetData.getIns().getData();
this.views.refreshData(this.pets);
//向子节点添加点击事件
this.views.addItemEvent(NodeEventType.TOUCH_START,this.onClickItem.bind(this));
}
//刷新选中
onUpdateSelect(){
//默认都不选中
this.views.getItems<PetIconItem>().forEach(item => {
item.isSelect = false;
item.onUpdateSelect();
})
//设置选中
if(this.index != -1){
let current = this.views.getItems<PetIconItem>()[this.index]
current.isSelect = true;
current.onUpdateSelect();
}
//显示选中宠物
this.spine.skeletonData = app.battleRes.roleSpine[this.pets[this.index].petTbId];
this.spine.setAnimation(0,UIPetAnim.std,true);
}
//点击Item
onClickItem(index:number){
//设置当前选中
this.index = index;
//刷新
this.onUpdateSelect();
}
//点击上阵
async onClickTactical(){
if(this.index < 0){
app.layer.Open(GUI.Tips,{text:"请选择要上阵的宠物."})
return;
}
//修改上阵信息
await PlayerTacticalData.getIns().UpdateIndexTactical(this.index,this.pets[this.index].petId);
//上阵完 关闭页面
app.layer.CloseNode(this.node);
}
} }

View File

@ -12,6 +12,7 @@ export enum GUI{
Login = "Login", //登录页面 Login = "Login", //登录页面
Loading = "Loading", //加载页面 Loading = "Loading", //加载页面
Tips = "Tips", //提示 Tips = "Tips", //提示
SelectionBox = "SelectionBox", //选择提示页面 (用于玩家确定该操作)
/** 新手引导 */ /** 新手引导 */
NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名 NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名
@ -31,12 +32,20 @@ export enum GUI{
const UISystemConfig:{ [key: string]: JNLayerInfo; } = { const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.Tips]:{ [GUI.Tips]:{
layer:GLayer.Tips, layer:GLayer.Tips,
uri: "prefab/ui/系统页面/Tips/TipsView", uri: "prefab/ui/系统页面/提示/TipsView",
anims:{ anims:{
front:JNLayerAnim.BackOutOpen, front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose back:JNLayerAnim.BackInClose
} }
}, },
[GUI.SelectionBox]:{
layer:GLayer.Tips,
uri: "prefab/ui/系统页面/选择提示/SelectionBox",
anims:{
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
},
},
[GUI.Login]:{ [GUI.Login]:{
layer:GLayer.Popup, layer:GLayer.Popup,
uri: "prefab/ui/系统页面/LoginView", uri: "prefab/ui/系统页面/LoginView",
@ -58,7 +67,7 @@ const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
//主页UI //主页UI
const UIMainConfig:{ [key: string]: JNLayerInfo; } = { const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.MainChat]:{ [GUI.MainChat]:{
layer:GLayer.Tips, layer:GLayer.View,
uri: "prefab/ui/主页/聊天/MainChatView", uri: "prefab/ui/主页/聊天/MainChatView",
anims:{ anims:{
front:JNLayerAnim.Enlarge, front:JNLayerAnim.Enlarge,

@ -1 +1 @@
Subproject commit ccb2f088bd74f0d011f38bcc21f6faf80e4ded4d Subproject commit bb05b446537ccc00b5745f3af2ee2fdcca81dc09

View File

@ -54,7 +54,7 @@ public class GPlayerTacticalController {
//设置玩家上阵 //设置玩家上阵
@ApiImplicitParams({}) @ApiImplicitParams({})
@ApiOperation(value = "设置玩家上阵") @ApiOperation(value = "设置玩家上阵")
@GetMapping("/set") @PostMapping("/set")
public NewsContext<PlayerTactical> setInfo(@CurrentPlayer Player player, @RequestBody PlayerTactical tactical){ public NewsContext<PlayerTactical> setInfo(@CurrentPlayer Player player, @RequestBody PlayerTactical tactical){
tactical.setPlayerId(player.getPlayerId()); tactical.setPlayerId(player.getPlayerId());