diff --git a/DataTables/Datas/__beans__.xlsx b/DataTables/Datas/__beans__.xlsx index 3fdcee74..157593a2 100644 Binary files a/DataTables/Datas/__beans__.xlsx and b/DataTables/Datas/__beans__.xlsx differ diff --git a/DataTables/Datas/战斗/角色/升级/角色升级消耗表.xlsx b/DataTables/Datas/战斗/角色/升级/角色升级消耗表.xlsx index 98ea12bc..63d2cd61 100644 Binary files a/DataTables/Datas/战斗/角色/升级/角色升级消耗表.xlsx and b/DataTables/Datas/战斗/角色/升级/角色升级消耗表.xlsx differ diff --git a/JisolGameCocos/assets/res/UI/宠物.meta b/JisolGameCocos/assets/res/UI/宠物.meta new file mode 100644 index 00000000..31fe463b --- /dev/null +++ b/JisolGameCocos/assets/res/UI/宠物.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "74a175d5-0c0f-465a-883c-8c9af5b40cfe", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/res/UI/通用.meta b/JisolGameCocos/assets/res/UI/通用.meta new file mode 100644 index 00000000..394f4d28 --- /dev/null +++ b/JisolGameCocos/assets/res/UI/通用.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "db84da0f-9f72-42b4-aac3-31a93092820f", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/res/UI/通用/ICON.meta b/JisolGameCocos/assets/res/UI/通用/ICON.meta new file mode 100644 index 00000000..797e8be4 --- /dev/null +++ b/JisolGameCocos/assets/res/UI/通用/ICON.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "191aa1fb-ff89-4513-89a0-4e251d5cb524", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png b/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png new file mode 100644 index 00000000..c695536c Binary files /dev/null and b/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png differ diff --git a/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png.meta b/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png.meta new file mode 100644 index 00000000..9c802f65 --- /dev/null +++ b/JisolGameCocos/assets/res/UI/通用/ICON/ty_xingxing.png.meta @@ -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" + } +} diff --git a/JisolGameCocos/assets/resources/config/data/schema.ts b/JisolGameCocos/assets/resources/config/data/schema.ts index ce50efc3..accbba91 100644 --- a/JisolGameCocos/assets/resources/config/data/schema.ts +++ b/JisolGameCocos/assets/resources/config/data/schema.ts @@ -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 /** * 默认攻击属性 */ diff --git a/JisolGameCocos/assets/resources/config/json/tbgattribute.json b/JisolGameCocos/assets/resources/config/json/tbgattribute.json index 4ece033b..4435e535 100644 --- a/JisolGameCocos/assets/resources/config/json/tbgattribute.json +++ b/JisolGameCocos/assets/resources/config/json/tbgattribute.json @@ -8,5 +8,10 @@ "id": 110002, "name": "防御", "sign": "Defend" + }, + { + "id": 110003, + "name": "血量", + "sign": "Blood" } ] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/config/json/tbgrolebaseattribute.json b/JisolGameCocos/assets/resources/config/json/tbgrolebaseattribute.json index a5e7765b..7e3570d2 100644 --- a/JisolGameCocos/assets/resources/config/json/tbgrolebaseattribute.json +++ b/JisolGameCocos/assets/resources/config/json/tbgrolebaseattribute.json @@ -1,6 +1,7 @@ [ { "id": 0, + "Blood": 100, "Attack": 10, "Defend": 5 } diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon.meta new file mode 100644 index 00000000..5eee4455 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "168231ad-d078-4779-8f9f-e44d5227ae32", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/列表选择宠物ICON.prefab b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/列表选择宠物ICON.prefab similarity index 100% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/列表选择宠物ICON.prefab rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/列表选择宠物ICON.prefab diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/列表选择宠物ICON.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/列表选择宠物ICON.prefab.meta similarity index 100% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/列表选择宠物ICON.prefab.meta rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/列表选择宠物ICON.prefab.meta diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/宠物ICON.prefab similarity index 52% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/宠物ICON.prefab index 94bef3a2..a19014cb 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/宠物ICON.prefab @@ -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", diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/宠物ICON.prefab.meta similarity index 100% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/宠物ICON.prefab.meta rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/宠物ICON.prefab.meta diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/选择宠物ICON.prefab b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/选择宠物ICON.prefab similarity index 100% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/选择宠物ICON.prefab rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/选择宠物ICON.prefab diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/选择宠物ICON.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/选择宠物ICON.prefab.meta similarity index 100% rename from JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/选择宠物ICON.prefab.meta rename to JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/icon/选择宠物ICON.prefab.meta diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info.meta new file mode 100644 index 00000000..e80580a3 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "969fb4a4-4ab2-4659-8503-e4ba950b83be", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab new file mode 100644 index 00000000..d661c59c --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab @@ -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 + } +] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab.meta b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab.meta new file mode 100644 index 00000000..8da9fa70 --- /dev/null +++ b/JisolGameCocos/assets/resources/prefab/ui/常用预制体/宠物/info/宠物预览窗口.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.49", + "importer": "prefab", + "imported": true, + "uuid": "561f1c86-f948-432d-8250-f204ff864dbd", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "宠物预览窗口" + } +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab b/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab index 3b98dc88..3f393ba6 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/阵法/阵法选择页面.prefab @@ -25,17 +25,17 @@ "_active": true, "_components": [ { - "__id__": 124 + "__id__": 121 }, { - "__id__": 126 + "__id__": 123 }, { - "__id__": 128 + "__id__": 125 } ], "_prefab": { - "__id__": 130 + "__id__": 127 }, "_lpos": { "__type__": "cc.Vec3", @@ -79,26 +79,26 @@ "__id__": 3 }, { - "__id__": 54 + "__id__": 51 }, { - "__id__": 98 + "__id__": 95 } ], "_active": true, "_components": [ { - "__id__": 117 + "__id__": 114 }, { - "__id__": 119 + "__id__": 116 }, { - "__id__": 121 + "__id__": 118 } ], "_prefab": { - "__id__": 123 + "__id__": 120 }, "_lpos": { "__type__": "cc.Vec3", @@ -142,23 +142,23 @@ "__id__": 4 }, { - "__id__": 16 + "__id__": 12 }, { - "__id__": 33 + "__id__": 29 } ], "_active": true, "_components": [ { - "__id__": 49 + "__id__": 46 }, { - "__id__": 51 + "__id__": 48 } ], "_prefab": { - "__id__": 53 + "__id__": 50 }, "_lpos": { "__type__": "cc.Vec3", @@ -191,277 +191,115 @@ }, { "__type__": "cc.Node", - "_name": "宠物", "_objFlags": 0, - "__editorExtras__": {}, "_parent": { "__id__": 3 }, - "_children": [ + "_prefab": { + "__id__": 5 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 4 + }, + "asset": { + "__uuid__": "561f1c86-f948-432d-8250-f204ff864dbd", + "__expectedType__": "cc.Prefab" + }, + "fileId": "89WDKPsx9CX5sG3Mkwo+WZ", + "instance": { + "__id__": 6 + }, + "targetOverrides": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "79Vi7kJ2FG851Azjlol47a", + "prefabRootNode": { + "__id__": 1 + }, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ { - "__id__": 5 - } - ], - "_active": true, - "_components": [ - { - "__id__": 11 + "__id__": 7 }, { - "__id__": 13 + "__id__": 9 + }, + { + "__id__": 10 + }, + { + "__id__": 11 } ], - "_prefab": { - "__id__": 15 + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 8 }, - "_lpos": { + "propertyPath": [ + "_name" + ], + "value": "宠物预览窗口" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "89WDKPsx9CX5sG3Mkwo+WZ" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 8 + }, + "propertyPath": [ + "_lpos" + ], + "value": { "__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__": 4 + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 8 }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 6 - }, - { - "__id__": 8 - } + "propertyPath": [ + "_lrot" ], - "_prefab": { - "__id__": 10 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 0, - "y": -85.798, - "z": 0 - }, - "_lrot": { + "value": { "__type__": "cc.Quat", "x": 0, "y": 0, "z": 0, "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 8 }, - "_lscale": { - "__type__": "cc.Vec3", - "x": 1, - "y": 1, - "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__": 5 - }, - "_enabled": true, - "__prefab": { - "__id__": 7 - }, - "_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__": 5 - }, - "_enabled": true, - "__prefab": { - "__id__": 9 - }, - "_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.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 4 - }, - "_enabled": true, - "__prefab": { - "__id__": 12 - }, - "_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__": 4 - }, - "_enabled": true, - "__prefab": { - "__id__": 14 - }, - "_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__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "89WDKPsx9CX5sG3Mkwo+WZ", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null + } }, { "__type__": "cc.Node", @@ -473,23 +311,23 @@ }, "_children": [ { - "__id__": 17 + "__id__": 13 } ], "_active": true, "_components": [ + { + "__id__": 21 + }, + { + "__id__": 23 + }, { "__id__": 25 - }, - { - "__id__": 27 - }, - { - "__id__": 29 } ], "_prefab": { - "__id__": 32 + "__id__": 28 }, "_lpos": { "__type__": "cc.Vec3", @@ -526,23 +364,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 16 + "__id__": 12 }, "_children": [], "_active": true, "_components": [ + { + "__id__": 14 + }, + { + "__id__": 16 + }, { "__id__": 18 - }, - { - "__id__": 20 - }, - { - "__id__": 22 } ], "_prefab": { - "__id__": 24 + "__id__": 20 }, "_lpos": { "__type__": "cc.Vec3", @@ -579,11 +417,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 13 }, "_enabled": true, "__prefab": { - "__id__": 19 + "__id__": 15 }, "_contentSize": { "__type__": "cc.Size", @@ -607,11 +445,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 13 }, "_enabled": true, "__prefab": { - "__id__": 21 + "__id__": 17 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -652,11 +490,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 17 + "__id__": 13 }, "_enabled": true, "__prefab": { - "__id__": 23 + "__id__": 19 }, "_color": { "__type__": "cc.Color", @@ -691,11 +529,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 16 + "__id__": 12 }, "_enabled": true, "__prefab": { - "__id__": 26 + "__id__": 22 }, "_contentSize": { "__type__": "cc.Size", @@ -719,11 +557,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 16 + "__id__": 12 }, "_enabled": true, "__prefab": { - "__id__": 28 + "__id__": 24 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -764,15 +602,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 16 + "__id__": 12 }, "_enabled": true, "__prefab": { - "__id__": 30 + "__id__": 26 }, "clickEvents": [ { - "__id__": 31 + "__id__": 27 } ], "_interactable": true, @@ -824,7 +662,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 16 + "__id__": 12 }, "_id": "" }, @@ -865,23 +703,23 @@ }, "_children": [ { - "__id__": 34 + "__id__": 30 } ], "_active": true, "_components": [ + { + "__id__": 38 + }, + { + "__id__": 40 + }, { "__id__": 42 - }, - { - "__id__": 44 - }, - { - "__id__": 46 } ], "_prefab": { - "__id__": 48 + "__id__": 45 }, "_lpos": { "__type__": "cc.Vec3", @@ -918,23 +756,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 33 + "__id__": 29 }, "_children": [], "_active": true, "_components": [ + { + "__id__": 31 + }, + { + "__id__": 33 + }, { "__id__": 35 - }, - { - "__id__": 37 - }, - { - "__id__": 39 } ], "_prefab": { - "__id__": 41 + "__id__": 37 }, "_lpos": { "__type__": "cc.Vec3", @@ -971,11 +809,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 30 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 32 }, "_contentSize": { "__type__": "cc.Size", @@ -999,11 +837,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 30 }, "_enabled": true, "__prefab": { - "__id__": 38 + "__id__": 34 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1044,11 +882,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 30 }, "_enabled": true, "__prefab": { - "__id__": 40 + "__id__": 36 }, "_color": { "__type__": "cc.Color", @@ -1083,11 +921,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 33 + "__id__": 29 }, "_enabled": true, "__prefab": { - "__id__": 43 + "__id__": 39 }, "_contentSize": { "__type__": "cc.Size", @@ -1111,11 +949,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 33 + "__id__": 29 }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 41 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1156,13 +994,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 33 + "__id__": 29 }, "_enabled": true, "__prefab": { - "__id__": 47 + "__id__": 43 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 44 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -1212,7 +1054,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 33 + "__id__": 29 }, "_id": "" }, @@ -1220,6 +1062,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "fa5nC7a5pDGqdZj5V01Y4g" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "00e5fiwk55OFq7ZIZmksXGJ", + "handler": "onClickUpLevel", + "customEventData": "" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -1243,7 +1095,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 50 + "__id__": 47 }, "_contentSize": { "__type__": "cc.Size", @@ -1271,7 +1123,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 49 }, "_alignFlags": 41, "_target": null, @@ -1320,29 +1172,29 @@ }, "_children": [ { - "__id__": 55 - }, - { - "__id__": 73 - } - ], - "_active": true, - "_components": [ - { - "__id__": 91 - }, - { - "__id__": 93 - }, - { - "__id__": 95 + "__id__": 52 }, { "__id__": 70 } ], + "_active": true, + "_components": [ + { + "__id__": 88 + }, + { + "__id__": 90 + }, + { + "__id__": 92 + }, + { + "__id__": 85 + } + ], "_prefab": { - "__id__": 97 + "__id__": 94 }, "_lpos": { "__type__": "cc.Vec3", @@ -1373,458 +1225,36 @@ }, "_id": "" }, - { - "__type__": "cc.Node", - "_name": "scrollBar", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 54 - }, - "_children": [ - { - "__id__": 56 - } - ], - "_active": true, - "_components": [ - { - "__id__": 62 - }, - { - "__id__": 64 - }, - { - "__id__": 66 - }, - { - "__id__": 68 - } - ], - "_prefab": { - "__id__": 90 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": 275, - "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": "bar", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 55 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 57 - }, - { - "__id__": 59 - } - ], - "_prefab": { - "__id__": 61 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -11, - "y": -31.25, - "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__": 56 - }, - "_enabled": true, - "__prefab": { - "__id__": 58 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 10, - "height": 156.25 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "beO0Ny+aRJPJW2zaQN0F4h" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 56 - }, - "_enabled": true, - "__prefab": { - "__id__": 60 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 0 - }, - "_spriteFrame": { - "__uuid__": "afc47931-f066-46b0-90be-9fe61f213428@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_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": "910UwgVSRAT7cUstqjnveL" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "b3OFicdQRJfYIKwYek8m6Z", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": { - "__id__": 63 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 12, - "height": 470 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 1, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "e9TdHK+SJMI6DHNVxyZg39" - }, - { - "__type__": "cc.Sprite", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": { - "__id__": 65 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 0 - }, - "_spriteFrame": { - "__uuid__": "ffb88a8f-af62-48f4-8f1d-3cb606443a43@f9941", - "__expectedType__": "cc.SpriteFrame" - }, - "_type": 1, - "_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": "54uy2HfAZEjL4u8EWI9Mht" - }, - { - "__type__": "cc.Widget", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": { - "__id__": 67 - }, - "_alignFlags": 37, - "_target": null, - "_left": 0, - "_right": 0, - "_top": 0, - "_bottom": 0, - "_horizontalCenter": 0, - "_verticalCenter": 0, - "_isAbsLeft": true, - "_isAbsRight": true, - "_isAbsTop": true, - "_isAbsBottom": true, - "_isAbsHorizontalCenter": true, - "_isAbsVerticalCenter": true, - "_originalWidth": 0, - "_originalHeight": 250, - "_alignMode": 1, - "_lockFlags": 0, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "9fIInbre9Hl5H1SRZjlNJ5" - }, - { - "__type__": "cc.ScrollBar", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 55 - }, - "_enabled": true, - "__prefab": { - "__id__": 69 - }, - "_scrollView": { - "__id__": 70 - }, - "_handle": { - "__id__": 59 - }, - "_direction": 1, - "_enableAutoHide": false, - "_autoHideTime": 1, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "61WBycWglGF7Wgxl/uixRt" - }, - { - "__type__": "563f2c1JcVKmrpHhC0vl3PI", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 54 - }, - "_enabled": true, - "__prefab": { - "__id__": 71 - }, - "bounceDuration": 0.23, - "brake": 0.75, - "elastic": true, - "inertia": true, - "horizontal": false, - "vertical": true, - "cancelInnerEvents": true, - "scrollEvents": [], - "_content": { - "__id__": 72 - }, - "_horizontalScrollBar": null, - "_verticalScrollBar": { - "__id__": 68 - }, - "itemPrefab": { - "__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae", - "__expectedType__": "cc.Prefab" - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "5fzZ+QwLdDtZman+w7PVqT" - }, - { - "__type__": "cc.Node", - "_name": "content", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 73 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 83 - }, - { - "__id__": 85 - }, - { - "__id__": 87 - } - ], - "_prefab": { - "__id__": 89 - }, - "_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": "view", "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 54 + "__id__": 51 }, "_children": [ { - "__id__": 72 + "__id__": 53 } ], "_active": true, "_components": [ { - "__id__": 74 + "__id__": 61 }, { - "__id__": 76 + "__id__": 63 }, { - "__id__": 78 + "__id__": 65 }, { - "__id__": 80 + "__id__": 67 } ], "_prefab": { - "__id__": 82 + "__id__": 69 }, "_lpos": { "__type__": "cc.Vec3", @@ -1855,17 +1285,185 @@ }, "_id": "" }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 52 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + }, + { + "__id__": 56 + }, + { + "__id__": 58 + } + ], + "_prefab": { + "__id__": 60 + }, + "_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__": 73 + "__id__": 53 }, "_enabled": true, "__prefab": { - "__id__": 75 + "__id__": 55 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 550, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "20Td8nkthAcobKTsBlmi2z" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 53 + }, + "_enabled": true, + "__prefab": { + "__id__": 57 + }, + "_resizeMode": 1, + "_layoutType": 3, + "_cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_startAxis": 0, + "_paddingLeft": 10, + "_paddingRight": 0, + "_paddingTop": 20, + "_paddingBottom": 20, + "_spacingX": 8, + "_spacingY": 8, + "_verticalDirection": 1, + "_horizontalDirection": 0, + "_constraint": 0, + "_constraintNum": 2, + "_affectedByScale": false, + "_isAlign": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a6xaxXKgRL2pSINNL7Pr+G" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 53 + }, + "_enabled": true, + "__prefab": { + "__id__": 59 + }, + "_alignFlags": 40, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 220, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "affoUC3LVAx4A6MCY9WVFL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "5bvNDVSK5MxJT7deiKZQ9z", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 52 + }, + "_enabled": true, + "__prefab": { + "__id__": 62 }, "_contentSize": { "__type__": "cc.Size", @@ -1889,11 +1487,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 73 + "__id__": 52 }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 64 }, "_type": 0, "_inverted": false, @@ -1911,11 +1509,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 73 + "__id__": 52 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 66 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1957,11 +1555,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 73 + "__id__": 52 }, "_enabled": true, "__prefab": { - "__id__": 81 + "__id__": 68 }, "_alignFlags": 45, "_target": null, @@ -2000,71 +1598,274 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 51 + }, + "_children": [ + { + "__id__": 71 + } + ], + "_active": true, + "_components": [ + { + "__id__": 77 + }, + { + "__id__": 79 + }, + { + "__id__": 81 + }, + { + "__id__": 83 + } + ], + "_prefab": { + "__id__": 87 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 275, + "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": "bar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 70 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + }, + { + "__id__": 74 + } + ], + "_prefab": { + "__id__": 76 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -11, + "y": -31.25, + "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__": 72 + "__id__": 71 }, "_enabled": true, "__prefab": { - "__id__": 84 + "__id__": 73 }, "_contentSize": { "__type__": "cc.Size", - "width": 550, - "height": 10 + "width": 10, + "height": 156.25 }, "_anchorPoint": { "__type__": "cc.Vec2", - "x": 0.5, - "y": 1 + "x": 0, + "y": 0 }, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "20Td8nkthAcobKTsBlmi2z" + "fileId": "1eUWXYIKlB7IPDzTAVjKP8" }, { - "__type__": "cc.Layout", + "__type__": "cc.Sprite", "_name": "", "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 72 + "__id__": 71 }, "_enabled": true, "__prefab": { - "__id__": 86 + "__id__": 75 }, - "_resizeMode": 1, - "_layoutType": 3, - "_cellSize": { - "__type__": "cc.Size", - "width": 40, - "height": 40 + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 0 }, - "_startAxis": 0, - "_paddingLeft": 10, - "_paddingRight": 0, - "_paddingTop": 10, - "_paddingBottom": 0, - "_spacingX": 8, - "_spacingY": 8, - "_verticalDirection": 1, - "_horizontalDirection": 0, - "_constraint": 0, - "_constraintNum": 2, - "_affectedByScale": false, - "_isAlign": false, + "_spriteFrame": { + "__uuid__": "afc47931-f066-46b0-90be-9fe61f213428@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_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": "a6xaxXKgRL2pSINNL7Pr+G" + "fileId": "d2FLI2AaxNDIgaPgLYueD0" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "e6o2yq2GBFzIVC8TUJGtz7", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 70 + }, + "_enabled": true, + "__prefab": { + "__id__": 78 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 470 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "02ejZTPPJJWpSPEQTexR9Q" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 70 + }, + "_enabled": true, + "__prefab": { + "__id__": 80 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 0 + }, + "_spriteFrame": { + "__uuid__": "ffb88a8f-af62-48f4-8f1d-3cb606443a43@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_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": "0eKTDug6NJ0IXz40BuvXiZ" }, { "__type__": "cc.Widget", @@ -2072,13 +1873,13 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 72 + "__id__": 70 }, "_enabled": true, "__prefab": { - "__id__": 88 + "__id__": 82 }, - "_alignFlags": 40, + "_alignFlags": 37, "_target": null, "_left": 0, "_right": 0, @@ -2092,15 +1893,79 @@ "_isAbsBottom": true, "_isAbsHorizontalCenter": true, "_isAbsVerticalCenter": true, - "_originalWidth": 220, - "_originalHeight": 0, - "_alignMode": 2, + "_originalWidth": 0, + "_originalHeight": 250, + "_alignMode": 1, "_lockFlags": 0, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "affoUC3LVAx4A6MCY9WVFL" + "fileId": "ebKW0FJctDEKeqJoTeN0y+" + }, + { + "__type__": "cc.ScrollBar", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 70 + }, + "_enabled": true, + "__prefab": { + "__id__": 84 + }, + "_scrollView": { + "__id__": 85 + }, + "_handle": { + "__id__": 74 + }, + "_direction": 1, + "_enableAutoHide": true, + "_autoHideTime": 1, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ccZ0BL3f1L5Z9ro54uw7Ep" + }, + { + "__type__": "563f2c1JcVKmrpHhC0vl3PI", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 51 + }, + "_enabled": true, + "__prefab": { + "__id__": 86 + }, + "bounceDuration": 0.23, + "brake": 0.75, + "elastic": true, + "inertia": true, + "horizontal": false, + "vertical": true, + "cancelInnerEvents": true, + "scrollEvents": [], + "_content": { + "__id__": 53 + }, + "_horizontalScrollBar": null, + "_verticalScrollBar": { + "__id__": 83 + }, + "itemPrefab": { + "__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae", + "__expectedType__": "cc.Prefab" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5fzZ+QwLdDtZman+w7PVqT" }, { "__type__": "cc.PrefabInfo", @@ -2110,20 +1975,7 @@ "asset": { "__id__": 0 }, - "fileId": "5bvNDVSK5MxJT7deiKZQ9z", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "47OMtehs1PTLY6wRDnMmy5", + "fileId": "81eGIEm/ZKtaSKRj+zzrnB", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -2134,11 +1986,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 51 }, "_enabled": true, "__prefab": { - "__id__": 92 + "__id__": 89 }, "_contentSize": { "__type__": "cc.Size", @@ -2162,11 +2014,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 51 }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 91 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2207,11 +2059,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 51 }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 93 }, "_alignFlags": 45, "_target": null, @@ -2260,26 +2112,26 @@ }, "_children": [ { - "__id__": 99 + "__id__": 96 } ], "_active": true, "_components": [ { - "__id__": 107 + "__id__": 104 }, { - "__id__": 109 + "__id__": 106 + }, + { + "__id__": 108 }, { "__id__": 111 - }, - { - "__id__": 114 } ], "_prefab": { - "__id__": 116 + "__id__": 113 }, "_lpos": { "__type__": "cc.Vec3", @@ -2316,23 +2168,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 95 }, "_children": [], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 97 }, { - "__id__": 102 + "__id__": 99 }, { - "__id__": 104 + "__id__": 101 } ], "_prefab": { - "__id__": 106 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -2369,11 +2221,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 96 }, "_enabled": true, "__prefab": { - "__id__": 101 + "__id__": 98 }, "_contentSize": { "__type__": "cc.Size", @@ -2397,11 +2249,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 96 }, "_enabled": true, "__prefab": { - "__id__": 103 + "__id__": 100 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2442,11 +2294,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 96 }, "_enabled": true, "__prefab": { - "__id__": 105 + "__id__": 102 }, "_color": { "__type__": "cc.Color", @@ -2481,11 +2333,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 108 + "__id__": 105 }, "_contentSize": { "__type__": "cc.Size", @@ -2509,11 +2361,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 110 + "__id__": 107 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2554,15 +2406,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 112 + "__id__": 109 }, "clickEvents": [ { - "__id__": 113 + "__id__": 110 } ], "_interactable": true, @@ -2614,7 +2466,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 98 + "__id__": 95 }, "_id": "" }, @@ -2638,11 +2490,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 115 + "__id__": 112 }, "_alignFlags": 4, "_target": null, @@ -2691,7 +2543,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 118 + "__id__": 115 }, "_contentSize": { "__type__": "cc.Size", @@ -2719,7 +2571,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 120 + "__id__": 117 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2764,7 +2616,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 122 + "__id__": 119 }, "_id": "" }, @@ -2795,7 +2647,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 125 + "__id__": 122 }, "_contentSize": { "__type__": "cc.Size", @@ -2823,7 +2675,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 127 + "__id__": 124 }, "_alignFlags": 45, "_target": null, @@ -2859,17 +2711,15 @@ }, "_enabled": true, "__prefab": { - "__id__": 129 + "__id__": 126 }, "mask": true, "maskOpcity": 80, "isClickMaskeClose": true, "views": { - "__id__": 70 - }, - "spine": { - "__id__": 8 + "__id__": 85 }, + "petPreview": null, "_id": "" }, { @@ -2886,6 +2736,37 @@ }, "fileId": "08xLpDDa9NlK3pgR7XiOqb", "instance": null, - "targetOverrides": null + "targetOverrides": [ + { + "__id__": 128 + } + ], + "nestedPrefabInstanceRoots": [ + { + "__id__": 4 + } + ] + }, + { + "__type__": "cc.TargetOverrideInfo", + "source": { + "__id__": 125 + }, + "sourceInfo": null, + "propertyPath": [ + "petPreview" + ], + "target": { + "__id__": 4 + }, + "targetInfo": { + "__id__": 129 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "bc8qV/Jc9CToUMI6ap2Chd" + ] } ] \ No newline at end of file diff --git a/JisolGameCocos/assets/script/consts/API.ts b/JisolGameCocos/assets/script/consts/API.ts index d1e21951..c1f1d516 100644 --- a/JisolGameCocos/assets/script/consts/API.ts +++ b/JisolGameCocos/assets/script/consts/API.ts @@ -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, //获取玩家阵法 diff --git a/JisolGameCocos/assets/script/data/PlayerPetData.ts b/JisolGameCocos/assets/script/data/PlayerPetData.ts index 3eb6b0ec..27971d53 100644 --- a/JisolGameCocos/assets/script/data/PlayerPetData.ts +++ b/JisolGameCocos/assets/script/data/PlayerPetData.ts @@ -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); diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts index a866531d..601c3628 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIcon.ts @@ -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(); + } } diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts index 2c561bcf..af1e3f7a 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelect.ts @@ -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); } diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelectScroll.ts b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelectScroll.ts index f09a349b..a422916f 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelectScroll.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/PetIconSelectScroll.ts @@ -11,7 +11,7 @@ export class PetIconSelectScroll extends JNScrollViewItem { select:PetIconSelect; protected start(): void { - this.select.setIcon(this.data.petTbId); + this.select.set(this.data); } } diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/info.meta b/JisolGameCocos/assets/script/ui/Consts/Pet/info.meta new file mode 100644 index 00000000..d25b1188 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/info.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "c1b92428-4724-4f3e-b2c6-416af802434c", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts b/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts new file mode 100644 index 00000000..a9297fd8 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts @@ -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(); + } + +} + + diff --git a/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts.meta b/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts.meta new file mode 100644 index 00000000..7742e9d2 --- /dev/null +++ b/JisolGameCocos/assets/script/ui/Consts/Pet/info/PetPreviewWindow.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "f423768a-7790-4a2f-b005-a40110aba905", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/Home/Sreeps/MainSreepsIcon.ts b/JisolGameCocos/assets/script/ui/Home/Sreeps/MainSreepsIcon.ts index 2992b6a4..07236e9a 100644 --- a/JisolGameCocos/assets/script/ui/Home/Sreeps/MainSreepsIcon.ts +++ b/JisolGameCocos/assets/script/ui/Home/Sreeps/MainSreepsIcon.ts @@ -12,7 +12,14 @@ export class MainSreepsIcon extends JNScrollViewItem { 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 + }); } } diff --git a/JisolGameCocos/assets/script/ui/Tactical/IntoBattleView.ts b/JisolGameCocos/assets/script/ui/Tactical/IntoBattleView.ts index ad4969e4..c00bfdb5 100644 --- a/JisolGameCocos/assets/script/ui/Tactical/IntoBattleView.ts +++ b/JisolGameCocos/assets/script/ui/Tactical/IntoBattleView.ts @@ -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:"升级成功!"}) + } + + } diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index 47865f8d..b1ff668c 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit 47865f8d0af09462f3cf8594ccde001802df8723 +Subproject commit b1ff668cfa5f73ab924bf16904c77cac17817961 diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleBaseAttribute.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleBaseAttribute.java index 6e9b3b13..16fbb104 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleBaseAttribute.java +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleBaseAttribute.java @@ -17,6 +17,7 @@ import com.google.gson.JsonObject; public final class TbGRoleBaseAttribute extends AbstractBean { public TbGRoleBaseAttribute(JsonObject _buf) { id = _buf.get("id").getAsInt(); + Blood = _buf.get("Blood").getAsInt(); Attack = _buf.get("Attack").getAsInt(); Defend = _buf.get("Defend").getAsInt(); } @@ -29,6 +30,10 @@ public final class TbGRoleBaseAttribute extends AbstractBean { * 角色Id (0 则默认) */ public final int id; + /** + * 默认血量 + */ + public final int Blood; /** * 默认攻击属性 */ @@ -47,6 +52,7 @@ public final class TbGRoleBaseAttribute extends AbstractBean { public String toString() { return "{ " + "(format_field_name __code_style field.name):" + id + "," + + "(format_field_name __code_style field.name):" + Blood + "," + "(format_field_name __code_style field.name):" + Attack + "," + "(format_field_name __code_style field.name):" + Defend + "," + "}"; diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java index df1241a9..26051f4c 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java @@ -17,7 +17,7 @@ import com.google.gson.JsonObject; public final class TbGRoleUpLevel extends AbstractBean { public TbGRoleUpLevel(JsonObject _buf) { grade = _buf.get("grade").getAsInt(); - { com.google.gson.JsonArray _json0_ = _buf.get("materials").getAsJsonArray(); int __n0 = _json0_.size(); materials = new cfg.TbGEntity.Resource[__n0]; int __index0=0; for(JsonElement __e0 : _json0_) { cfg.TbGEntity.Resource __v0; __v0 = cfg.TbGEntity.Resource.deserialize(__e0.getAsJsonObject()); materials[__index0++] = __v0; } } + { com.google.gson.JsonArray _json0_ = _buf.get("materials").getAsJsonArray(); int __n0 = _json0_.size(); materials = new cfg.TbGEntity.TResource[__n0]; int __index0=0; for(JsonElement __e0 : _json0_) { cfg.TbGEntity.TResource __v0; __v0 = cfg.TbGEntity.TResource.deserialize(__e0.getAsJsonObject()); materials[__index0++] = __v0; } } } public static TbGRoleUpLevel deserialize(JsonObject _buf) { @@ -31,7 +31,7 @@ public final class TbGRoleUpLevel extends AbstractBean { /** * 消耗的材料 */ - public final cfg.TbGEntity.Resource[] materials; + public final cfg.TbGEntity.TResource[] materials; public static final int __ID__ = -877225318; diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGEntity/Resource.java b/JisolGameServer/Main/src/main/java/cfg/TbGEntity/TResource.java similarity index 79% rename from JisolGameServer/Main/src/main/java/cfg/TbGEntity/Resource.java rename to JisolGameServer/Main/src/main/java/cfg/TbGEntity/TResource.java index 5537f48c..2a9e9863 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TbGEntity/Resource.java +++ b/JisolGameServer/Main/src/main/java/cfg/TbGEntity/TResource.java @@ -17,14 +17,14 @@ import com.google.gson.JsonObject; /** * 资源信息 */ -public final class Resource extends AbstractBean { - public Resource(JsonObject _buf) { +public final class TResource extends AbstractBean { + public TResource(JsonObject _buf) { id = _buf.get("id").getAsInt(); value = _buf.get("value").getAsInt(); } - public static Resource deserialize(JsonObject _buf) { - return new cfg.TbGEntity.Resource(_buf); + public static TResource deserialize(JsonObject _buf) { + return new cfg.TbGEntity.TResource(_buf); } /** @@ -36,7 +36,7 @@ public final class Resource extends AbstractBean { */ public final int value; - public static final int __ID__ = -215001824; + public static final int __ID__ = 125240784; @Override public int getTypeId() { return __ID__; } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/config/WebConfig.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/config/WebConfig.java index 67bf9d48..5747e589 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/config/WebConfig.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/config/WebConfig.java @@ -4,7 +4,10 @@ import cn.jisol.game.controller.argsresolver.PlayerMethodArgumentResolver; import cn.jisol.game.controller.argsresolver.UserMethodArgumentResolver; import cn.jisol.game.controller.game.GPlayerController; import cn.jisol.game.interceptor.LoginInterceptor; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; @@ -28,10 +31,22 @@ public class WebConfig implements WebMvcConfigurer { registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/game/**"); } + /** + * 参数解析 + * @param resolvers + */ @Override public void addArgumentResolvers(List resolvers) { WebMvcConfigurer.super.addArgumentResolvers(resolvers); resolvers.add(new UserMethodArgumentResolver()); resolvers.add(new PlayerMethodArgumentResolver(this.playerController)); } + + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor()); + return interceptor; + } + } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/exception/HTTPExceptionHandler.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/exception/HTTPExceptionHandler.java index 39155bab..f68f7d7b 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/exception/HTTPExceptionHandler.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/exception/HTTPExceptionHandler.java @@ -1,6 +1,7 @@ package cn.jisol.game.controller.exception; import cn.jisol.ngame.util.NewsContext; +import org.springframework.retry.RetryException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; @@ -17,6 +18,13 @@ public class HTTPExceptionHandler { return NewsContext.onMessage("Token 失效",null,LOGIN_TOKEN); } + //并发异常 + @ExceptionHandler(value = RetryException.class) + @ResponseBody + public NewsContext retryExceptionHandler(RetryException e){ + return NewsContext.onFail("服务器忙碌啦~ 一会再试试."); + } + //全局异常 @ExceptionHandler(value = Exception.class) @ResponseBody diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GNoviceController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GNoviceController.java index 370e4c67..7e40cd27 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GNoviceController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GNoviceController.java @@ -51,7 +51,7 @@ public class GNoviceController { return NewsContext.onFail("你已经有宠物了!"); }else{ //选择宠物 - if (playerPetService.save(PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(petId).petGrade(0).build())){ + if (playerPetService.save(PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(petId).petLevel(0).build())){ return NewsContext.onSuccess("选择宠物成功"); }else{ return NewsContext.onSuccess("选择宠物失败"); diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java index 7444354f..64780203 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java @@ -1,10 +1,14 @@ package cn.jisol.game.controller.game; +import cfg.TB.TbGRoleUpLevel; +import cfg.TbGEntity.TResource; import cn.jisol.game.controller.argsresolver.CurrentPlayer; import cn.jisol.game.data.TD; import cn.jisol.game.entity.game.Player; import cn.jisol.game.entity.game.PlayerPet; +import cn.jisol.game.entity.game.Resource; import cn.jisol.game.service.PlayerPetService; +import cn.jisol.game.service.ResourceService; import cn.jisol.game.vo.news.NewsResource; import cn.jisol.game.vo.news.ov.ResourceUpdateOV; import cn.jisol.game.vo.pet.PetUpStarOV; @@ -15,6 +19,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.retry.RetryException; +import org.springframework.retry.annotation.Retryable; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -34,6 +40,8 @@ public class GPlayerPetController { @Autowired PlayerPetService playerPetService; + @Autowired + ResourceService resourceService; //获取玩家宠物列表 @ApiImplicitParams({}) @@ -54,6 +62,7 @@ public class GPlayerPetController { @ApiOperation(value = "提升宠物星") @PostMapping("/up/star") @Transactional + @Retryable(value = RetryException.class) public NewsResource onUpStar(@RequestBody PetUpStarOV info, @CurrentPlayer Player player){ //判断参数 @@ -99,8 +108,8 @@ public class GPlayerPetController { pet.setPetStar(pet.getPetStar() + 1); } - //保存宠物信息 - playerPetService.updateById(pet); + //保存宠物信息 (保存失败则重试) + if(!playerPetService.updateById(pet)) throw new RetryException(""); //删除被合成的宠物 playerPetService.removeByIds(info.getPets()); @@ -122,15 +131,41 @@ public class GPlayerPetController { @ApiImplicitParams({}) @ApiOperation(value = "提升宠物等级") @PostMapping("/up/level/{petId}") + @Transactional + @Retryable(value = RetryException.class) public NewsResource onUpLevel(@PathVariable Integer petId, @CurrentPlayer Player player){ + //整理刷新数据 + ArrayList resources = new ArrayList<>(); + //获取需要升级的宠物 PlayerPet pet = playerPetService.getById(petId); if(Objects.isNull(pet) || !Objects.equals(pet.getPetPlayerId(), player.getPlayerId())){ return NewsResource.onFail("你未拥有这个宠物"); } - return NewsResource.onFail("升级成功"); + TbGRoleUpLevel resource = TD.DATA.getTbGRoleUpLevel().get(pet.getPetLevel() + 1); + + //扣除玩家材料 + for (int i = 0; i < resource.materials.length; i++) { + TResource res = resource.materials[i]; + Resource data = resourceService.addResourceValue(player.getPlayerId(), res.id, -((long) res.value)); + if (Objects.isNull(data)){ + return NewsResource.onFail("材料不够"); + }else{ + //刷新资源 + resources.add(ResourceUpdateOV.onUpdate(data)); //刷新资源 + } + } + + //升级 + pet.setPetLevel(pet.getPetLevel() + 1); + + //保存 + if(!playerPetService.updateById(pet)) throw new RetryException(""); + resources.add(ResourceUpdateOV.onPet(ResourceUpdateOV.ResourceUpdateType.UPDATE,pet)); //刷新宠物 + + return NewsResource.onSuccess("升级成功",pet,resources.toArray(new ResourceUpdateOV[0])); } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java index 40b86022..4e2a8828 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java @@ -100,7 +100,7 @@ public class GOnHookController { if(Objects.nonNull(creeps.remove(creepId))){ //增加玩家金币 (默认添加100) - Resource res = resourceService.addResourceValue(player.getPlayerId(), ResourceId.Gold, 100L); + Resource res = resourceService.addResourceValue(player.getPlayerId(), ResourceId.Gold.id, 100L); return NewsResource.onSuccess( "卖出成功", true, @@ -135,7 +135,7 @@ public class GOnHookController { } //捕捉 - PlayerPet pet = PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(onHookPet.getPetTbId()).petGrade(0).build(); + PlayerPet pet = PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(onHookPet.getPetTbId()).petLevel(0).build(); if(playerPetService.save(pet)){ return NewsContext.onSuccess("捕捉成功",pet); }else{ diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/PlayerPet.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/PlayerPet.java index bc21c12c..26a25b60 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/PlayerPet.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/PlayerPet.java @@ -3,6 +3,7 @@ package cn.jisol.game.entity.game; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.Version; import lombok.Builder; import lombok.Data; @@ -17,7 +18,9 @@ public class PlayerPet { private Long petId; //宠物唯一Id private Long petPlayerId; //宠物的玩家Id private Integer petTbId; //宠物配置表Id - private Integer petGrade; //宠物等级 + private Integer petLevel; //宠物等级 private Integer petStar; //宠物星级 private Integer petStarExp; //宠物星级经验 + @Version + private Integer version; } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/Resource.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/Resource.java index bc4604a1..b9a32445 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/Resource.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/entity/game/Resource.java @@ -3,6 +3,7 @@ package cn.jisol.game.entity.game; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.Version; import lombok.Builder; import lombok.Data; @@ -19,5 +20,7 @@ public class Resource { private Long playerId; //玩家Id private int resourceTbId; //资源配置表Id private Long resourceValue; //资源数量 + @Version + private Integer version; } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/service/ResourceService.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/service/ResourceService.java index e9531b55..1646c2c3 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/service/ResourceService.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/service/ResourceService.java @@ -8,10 +8,10 @@ import com.baomidou.mybatisplus.extension.service.IService; public interface ResourceService extends IService { //添加某个资源的数量 - public Resource addResourceValue(Long playerId, ResourceId type, Long value); + public Resource addResourceValue(Long playerId, int type, Long value); //初始化某个资源 - public Resource initResource(Long playerId, ResourceId type); + public Resource initResource(Long playerId, int type); public Resource initResource(Resource resource); } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/service/impl/ResourceServiceImpl.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/service/impl/ResourceServiceImpl.java index aab47630..05d6a2e9 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/service/impl/ResourceServiceImpl.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/service/impl/ResourceServiceImpl.java @@ -7,6 +7,8 @@ import cn.jisol.game.mapper.ResourceMapper; import cn.jisol.game.service.ResourceService; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.retry.RetryException; +import org.springframework.retry.annotation.Retryable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -22,15 +24,14 @@ public class ResourceServiceImpl extends ServiceImpl i * @return */ @Override - @Transactional - public Resource addResourceValue(Long playerId, ResourceId type, Long value) { + @Retryable(value = RetryException.class) + public Resource addResourceValue(Long playerId, int type, Long value) { //获取玩家资源 Resource res = this.getOne( Wrappers.lambdaQuery(Resource.class) .eq(Resource::getPlayerId, playerId) //玩家 - .eq(Resource::getResourceTbId, type.id) //资源 - .last(" for update") //加锁 + .eq(Resource::getResourceTbId, type) //资源 ); //如果没有资源则默认给一个0的资源 @@ -42,16 +43,20 @@ public class ResourceServiceImpl extends ServiceImpl i //添加资源 res.setResourceValue(res.getResourceValue() + value); - //保存资源 - this.saveOrUpdate(res); + if(res.getResourceValue() <= 0){ + return null; + } + + //保存资源 (保存失败重试) + if (!this.saveOrUpdate(res)) throw new RetryException(""); return res; } //初始化某个资源 @Override - public Resource initResource(Long playerId, ResourceId type) { - Resource resource = Resource.builder().playerId(playerId).resourceTbId(type.id).resourceValue(0L).build(); + public Resource initResource(Long playerId, int type) { + Resource resource = Resource.builder().playerId(playerId).resourceTbId(type).resourceValue(0L).build(); this.initResource(resource); return resource; } diff --git a/JisolGameServer/Main/src/main/resources/json/tbgattribute.json b/JisolGameServer/Main/src/main/resources/json/tbgattribute.json index 4ece033b..4435e535 100644 --- a/JisolGameServer/Main/src/main/resources/json/tbgattribute.json +++ b/JisolGameServer/Main/src/main/resources/json/tbgattribute.json @@ -8,5 +8,10 @@ "id": 110002, "name": "防御", "sign": "Defend" + }, + { + "id": 110003, + "name": "血量", + "sign": "Blood" } ] \ No newline at end of file diff --git a/JisolGameServer/Main/src/main/resources/json/tbgrolebaseattribute.json b/JisolGameServer/Main/src/main/resources/json/tbgrolebaseattribute.json index a5e7765b..7e3570d2 100644 --- a/JisolGameServer/Main/src/main/resources/json/tbgrolebaseattribute.json +++ b/JisolGameServer/Main/src/main/resources/json/tbgrolebaseattribute.json @@ -1,6 +1,7 @@ [ { "id": 0, + "Blood": 100, "Attack": 10, "Defend": 5 }