提交升级

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-28 02:13:05 +08:00
parent 62959f80e4
commit 07db3912cc
46 changed files with 2482 additions and 961 deletions

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "74a175d5-0c0f-465a-883c-8c9af5b40cfe",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "db84da0f-9f72-42b4-aac3-31a93092820f",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "191aa1fb-ff89-4513-89a0-4e251d5cb524",
"files": [],
"subMetas": {},
"userData": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "b3481cef-e88f-43bd-a899-107d397c50e0",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "b3481cef-e88f-43bd-a899-107d397c50e0@6c48a",
"displayName": "ty_xingxing",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "b3481cef-e88f-43bd-a899-107d397c50e0",
"visible": false
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "b3481cef-e88f-43bd-a899-107d397c50e0@f9941",
"displayName": "ty_xingxing",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 40,
"height": 39,
"rawWidth": 40,
"rawHeight": 39,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-20,
-19.5,
0,
20,
-19.5,
0,
-20,
19.5,
0,
20,
19.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
39,
40,
39,
0,
0,
40,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-20,
-19.5,
0
],
"maxPos": [
20,
19.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b3481cef-e88f-43bd-a899-107d397c50e0@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"fixAlphaTransparencyArtifacts": true,
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "b3481cef-e88f-43bd-a899-107d397c50e0@f9941"
}
}

View File

@@ -349,7 +349,7 @@ export class TbGRoleUpLevel {
if (_json_.grade === undefined) { throw new Error() }
this.grade = _json_.grade
if (_json_.materials === undefined) { throw new Error() }
{ this.materials = []; for(let _ele of _json_.materials) { let _e; _e = new TbGEntity.Resource(_ele); this.materials.push(_e);}}
{ this.materials = []; for(let _ele of _json_.materials) { let _e; _e = new TbGEntity.TResource(_ele); this.materials.push(_e);}}
}
/**
@@ -359,7 +359,7 @@ export class TbGRoleUpLevel {
/**
* 消耗的材料
*/
readonly materials: TbGEntity.Resource[]
readonly materials: TbGEntity.TResource[]
resolve(tables:Tables)
{
@@ -373,7 +373,7 @@ export namespace TbGEntity {
/**
* 资源信息
*/
export class Resource {
export class TResource {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
@@ -498,6 +498,8 @@ export class TbGRoleBaseAttribute {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.Blood === undefined) { throw new Error() }
this.Blood = _json_.Blood
if (_json_.Attack === undefined) { throw new Error() }
this.Attack = _json_.Attack
if (_json_.Defend === undefined) { throw new Error() }
@@ -508,6 +510,10 @@ export class TbGRoleBaseAttribute {
* 角色Id (0 则默认)
*/
readonly id: number
/**
* 默认血量
*/
readonly Blood: number
/**
* 默认攻击属性
*/

View File

@@ -8,5 +8,10 @@
"id": 110002,
"name": "防御",
"sign": "Defend"
},
{
"id": 110003,
"name": "血量",
"sign": "Blood"
}
]

View File

@@ -1,6 +1,7 @@
[
{
"id": 0,
"Blood": 100,
"Attack": 10,
"Defend": 5
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "168231ad-d078-4779-8f9f-e44d5227ae32",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -23,25 +23,22 @@
},
{
"__id__": 8
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 14
"__id__": 36
},
{
"__id__": 16
},
{
"__id__": 18
},
{
"__id__": 20
"__id__": 38
}
],
"_prefab": {
"__id__": 22
"__id__": 40
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -210,24 +207,81 @@
},
{
"__type__": "cc.Node",
"_name": "Spine",
"_name": "角色遮罩",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 15
},
{
"__id__": 17
},
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_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.Node",
"_name": "Spine",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 10
},
{
"__id__": 11
"__id__": 12
}
],
"_prefab": {
"__id__": 13
"__id__": 14
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -264,11 +318,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 10
"__id__": 11
},
"_contentSize": {
"__type__": "cc.Size",
@@ -292,11 +346,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 12
"__id__": 13
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -348,11 +402,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 15
"__id__": 16
},
"_contentSize": {
"__type__": "cc.Size",
@@ -368,28 +422,7 @@
},
{
"__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"
"fileId": "91h3J1Qo9NKp8P7pZ/ijRa"
},
{
"__type__": "cc.Mask",
@@ -397,11 +430,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 19
"__id__": 18
},
"_type": 0,
"_inverted": false,
@@ -411,7 +444,7 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "10zYj9H5FENZXD89pQVuyU"
"fileId": "bay7jjytVJP6Fzx/k5RFdU"
},
{
"__type__": "cc.Graphics",
@@ -419,11 +452,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 21
"__id__": 20
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -457,7 +490,377 @@
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1broUYdiFORJt5rRvetp3L"
"fileId": "4fJHZYu41AYIvcwxfCrJ6o"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "fc1fm88XdG0IiJpjOWJQQH",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "星星",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 23
}
],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 33
}
],
"_prefab": {
"__id__": 35
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -41.077,
"y": 40.126,
"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": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
},
{
"__id__": 26
},
{
"__id__": 28
}
],
"_prefab": {
"__id__": 30
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 23
},
"_enabled": true,
"__prefab": {
"__id__": 25
},
"_contentSize": {
"__type__": "cc.Size",
"width": 15.123046875,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "22LToggJFLz65T8RSXgQ+S"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 23
},
"_enabled": true,
"__prefab": {
"__id__": 27
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "1",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_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": "4abtrwT6VLZqOPs/7wUWc8"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 23
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0bN96UC0FDdYVC4Gmw8XkI"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a7Hwx3lcdMKpr4iJlqOtWX",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 32
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 39
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ffoTb67zBPv7VLwxcj9Uos"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 34
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "b3481cef-e88f-43bd-a899-107d397c50e0@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": "110QuG7J1EEYTogHJ93mar"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b6faJYRuNA3ImW/X+NRkI4",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 37
},
"_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__": 39
},
"spine": {
"__id__": 12
},
"starNode": {
"__id__": 22
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8v6Wyt6FBsbms2ouS3gEa"
},
{
"__type__": "cc.PrefabInfo",

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "969fb4a4-4ab2-4659-8503-e4ba950b83be",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,791 @@
[
{
"__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": [
{
"__id__": 2
},
{
"__id__": 8
},
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 30
},
{
"__id__": 32
},
{
"__id__": 34
}
],
"_prefab": {
"__id__": 36
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -134.352,
"y": -148.623,
"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": "Spine",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -85.798,
"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
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "5eaQjItvlAsrp/s4neGckz"
},
{
"__type__": "sp.Skeleton",
"_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
},
"_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": "3fo+IzfNJI24xTt+l2NFlf"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e2V1sMadtGB4Y4Z6L/J3A0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "星星",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 17
},
{
"__id__": 19
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -68,
"y": 96.216,
"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": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 12
},
{
"__id__": 14
}
],
"_prefab": {
"__id__": 16
},
"_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__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 11
},
"_contentSize": {
"__type__": "cc.Size",
"width": 15.123046875,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "41qw3OlLpADr0Lwpashx67"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 13
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "1",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_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": "85EWjPVyBKJKbIENMWQgge"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 9
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e2AWmVveVDV5PIXM41gvOy"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a71rIoiKBMkZjUYNYnyYE1",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 18
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 39
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "08l8Xi3jhJpa1Bp9Ec7TsB"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "b3481cef-e88f-43bd-a899-107d397c50e0@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": "c9okoCKF1D3bKit1FhOlJu"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "90C5iRpBFEBZo4hc/0yfoC",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "等级",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 29
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 91.671,
"y": 97.743,
"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__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 64.029296875,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 1,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "78JIvK0FREbqEhO1kogNv5"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "Lv 0",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 30,
"_fontSize": 30,
"_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": "b2mKTy6QdPWJJhD7CXdlrR"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 28
},
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_width": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "eaWfe0LjVMFL4LAeesnWN4"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "15tRVHOgZEsbSrCaLbLuf5",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 250
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "edT/qBxmdNWLuZFmLuO3EP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 201,
"g": 201,
"b": 201,
"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": "cdYxPWhL5JjaGfk+yEamDT"
},
{
"__type__": "f4237aKd5BKL7AFpAEQq6kF",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 35
},
"starNode": {
"__id__": 8
},
"levelLabel": {
"__id__": 25
},
"spine": {
"__id__": 5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "bc8qV/Jc9CToUMI6ap2Chd"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "89WDKPsx9CX5sG3Mkwo+WZ",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "561f1c86-f948-432d-8250-f204ff864dbd",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "宠物预览窗口"
}
}

View File

@@ -71,7 +71,7 @@ export interface PlayerPetOV{
petId:number, //宠物唯一Id
petPlayerId:number; //宠物的玩家Id
petTbId:number; //宠物配置表Id
petGrade:number; //宠物等级
petLevel:number; //宠物等级
petStar:number; //宠物星级
petStarExp:number; //宠物星级经验
}
@@ -102,7 +102,9 @@ export const API = {
/********** 宠物接口 ******************/
GetPlayerPets: async () => RData(await app.api.get(`/game/pet/list`),false) as PlayerPetOV[], //获取玩家全部宠物
//petId 需合成的Id pets 被合成的Id列表
PetUpStar: async (petId:number,pets:number[]) => RData(await app.api.post(`/game/pet/up/star`,{petId,pets}),true) as PlayerPetOV, //提升宠物星
PetUpStar: async (petId:number,pets:number[]) => RData(await app.api.post(`/game/pet/up/star`,{petId,pets}),true) as PlayerPetOV, //提升宠物星
//petId 升级的宠物Id
PetUpLevel: async (petId:number) => RData(await app.api.post(`/game/pet/up/level/${petId}`),true) as PlayerPetOV, //升级宠物
/********** 阵法接口 ******************/
GetPlayerTactical: async () => RData(await app.api.get(`/game/tactical/get`),false) as PlayerTacticalOV, //获取玩家阵法

View File

@@ -75,7 +75,7 @@ export default class PlayerPetData extends BaseData{
if(pet){
//更新数据
Object.assign(pet,resource);
app.event.emit(PlayerPetEvent.UPDATE_INFO)
app.event.emit(PlayerPetEvent.UPDATE_INFO,pet)
}else{
operation = ResourceUpdateType.ADD;
this.onUpdateOV(operation,resource);

View File

@@ -3,6 +3,9 @@ import { _decorator, Component, Node } from 'cc';
import { app } from '../../../App';
import { UIPetAnim } from '../../../consts/GData';
import { v3 } from 'cc';
import { PlayerPetOV } from '../../../consts/API';
import { Label } from 'cc';
import { PlayerPetEvent } from '../../../data/PlayerPetData';
const { ccclass, property } = _decorator;
@ccclass('PetIcon')
@@ -11,13 +14,54 @@ export class PetIcon extends Component {
@property(sp.Skeleton)
spine:sp.Skeleton;
//设置icon
setIcon(petTbId:number){
@property(Node)
starNode:Node; //星星
this.spine.skeletonData = app.battleRes.roleSpine[petTbId];
info:PlayerPetOV;
onLoad(){
this.reset();
//监听
app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
}
protected onDestroy(): void {
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
}
//初始化
reset(){
this.starNode.active = false;
}
//信息更新
onUpdateInfo(info:PlayerPetOV){
if(this.info && info.petId == this.info.petId){
this.onUpdateView(); //刷新页面
}
}
//刷新页面
onUpdateView(){
this.spine.skeletonData = app.battleRes.roleSpine[this.info.petTbId];
this.spine.setAnimation(0,UIPetAnim.std,true);
if(this.info.petStar){
this.starNode.active = true;
this.starNode.getComponentInChildren(Label).string = `${this.info.petStar}`;
}
}
//设置icon
set(info:PlayerPetOV){
this.reset();
this.info = info;
this.onUpdateView();
}
}

View File

@@ -1,5 +1,6 @@
import { _decorator, Component, Node } from 'cc';
import { PetIcon } from './PetIcon';
import { PlayerPetOV } from '../../../consts/API';
const { ccclass, property } = _decorator;
@ccclass('PetIconSelect')
@@ -43,10 +44,10 @@ export class PetIconSelect extends Component {
}
//设置icon
setIcon(petTbId:number){
//设置
set(info:PlayerPetOV){
this.petIcon.setIcon(petTbId);
this.petIcon.set(info);
}

View File

@@ -11,7 +11,7 @@ export class PetIconSelectScroll extends JNScrollViewItem<PlayerPetOV> {
select:PetIconSelect;
protected start(): void {
this.select.setIcon(this.data.petTbId);
this.select.set(this.data);
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c1b92428-4724-4f3e-b2c6-416af802434c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,78 @@
import { sp } from 'cc';
import { _decorator, Component, Node } from 'cc';
import { PlayerPetOV } from '../../../../consts/API';
import { app } from '../../../../App';
import { UIPetAnim } from '../../../../consts/GData';
import { Label } from 'cc';
import { PlayerPetEvent } from '../../../../data/PlayerPetData';
const { ccclass, property } = _decorator;
@ccclass('PetPreviewWindow')
export class PetPreviewWindow extends Component {
@property(Node)
starNode:Node; //星星节点
@property(Label)
levelLabel:Label; //等级
@property(sp.Skeleton)
spine:sp.Skeleton; //宠物Spine
info:PlayerPetOV;
onLoad(){
this.onUpdateInit();
//监听
app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
}
protected onDestroy(): void {
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this)
}
//初始化
onUpdateInit(){
//隐藏
this.starNode.active = false;
this.levelLabel.node.active = false;
}
//刷新信息
onUpdateInfo(info:PlayerPetOV){
if(this.info && info.petId == this.info.petId){
this.onUpdateView(); //刷新页面
}
}
//刷新页面
onUpdateView(){
this.onUpdateInit();
//显示宠物
this.spine.skeletonData = app.battleRes.roleSpine[this.info.petTbId];
this.spine.setAnimation(0,UIPetAnim.std,true);
//等级
this.levelLabel.node.active = true;
this.levelLabel.string = `Lv ${this.info.petLevel}`;
//如果有星则显示星
if(this.info.petStar){
this.starNode.active = true;
this.starNode.getComponentInChildren(Label).string = `${this.info.petStar}`;
}
}
//绑定显示的宠物
bind(info:PlayerPetOV){
this.info = info;
this.onUpdateView();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "f423768a-7790-4a2f-b005-a40110aba905",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -12,7 +12,14 @@ export class MainSreepsIcon extends JNScrollViewItem<GOnHookPet> {
icon:PetIconSelect;
start(){
this.icon.setIcon(this.data.petTbId);
this.icon.set({
petTbId: this.data.petTbId,
petId: 0,
petPlayerId: 0,
petLevel: 0,
petStar: 0,
petStarExp: 0
});
}
}

View File

@@ -6,11 +6,12 @@ import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/compone
import { NodeEventType } from 'cc';
import { sp } from 'cc';
import { app } from '../../App';
import { PlayerPetOV } from '../../consts/API';
import { API, PlayerPetOV } from '../../consts/API';
import { UIPetAnim } from '../../consts/GData';
import { GUI } from '../UIConfig';
import PlayerTacticalData from '../../data/PlayerTacticalData';
import { PetIconSelectScroll } from '../Consts/Pet/PetIconSelectScroll';
import { PetPreviewWindow } from '../Consts/Pet/info/PetPreviewWindow';
const { ccclass, property } = _decorator;
//上阵页面
@@ -21,8 +22,8 @@ export class IntoBattleView extends JNLayerBase {
@property(JNScrollView)
views:JNScrollView; //宠物列表
@property(sp.Skeleton)
spine:sp.Skeleton; //当前选中的宠物
@property(PetPreviewWindow)
petPreview:PetPreviewWindow; //宠物显示窗口
//宠物数据
pets:PlayerPetOV[] = [];
@@ -79,8 +80,7 @@ export class IntoBattleView extends JNLayerBase {
current.select.isSelect = true;
//显示选中宠物
this.spine.skeletonData = app.battleRes.roleSpine[this.pets[this.index].petTbId];
this.spine.setAnimation(0,UIPetAnim.std,true);
this.petPreview.bind(this.pets[this.index]);
}
}
@@ -126,6 +126,17 @@ export class IntoBattleView extends JNLayerBase {
}
//点击升级
async onClickUpLevel(){
if(this.index < 0){
app.layer.Open(GUI.Tips,{text:"请选择宠物."})
return;
}
if(await API.PetUpLevel(this.pets[this.index].petId))
app.layer.Open(GUI.Tips,{text:"升级成功!"})
}
}