diff --git a/assets/resources/gui/item_box.prefab b/assets/resources/gui/item_box.prefab index 437772de..06b7e7d6 100644 --- a/assets/resources/gui/item_box.prefab +++ b/assets/resources/gui/item_box.prefab @@ -27,18 +27,18 @@ ], "_active": true, "_components": [ - { - "__id__": 144 - }, - { - "__id__": 146 - }, { "__id__": 148 + }, + { + "__id__": 150 + }, + { + "__id__": 152 } ], "_prefab": { - "__id__": 150 + "__id__": 154 }, "_lpos": { "__type__": "cc.Vec3", @@ -218,29 +218,29 @@ "__id__": 9 }, { - "__id__": 31 + "__id__": 33 }, { - "__id__": 47 + "__id__": 51 }, { - "__id__": 77 + "__id__": 81 }, { - "__id__": 107 + "__id__": 111 }, { - "__id__": 137 + "__id__": 141 } ], "_active": true, "_components": [ { - "__id__": 141 + "__id__": 145 } ], "_prefab": { - "__id__": 143 + "__id__": 147 }, "_lpos": { "__type__": "cc.Vec3", @@ -293,11 +293,11 @@ "_active": true, "_components": [ { - "__id__": 28 + "__id__": 30 } ], "_prefab": { - "__id__": 30 + "__id__": 32 }, "_lpos": { "__type__": "cc.Vec3", @@ -616,10 +616,13 @@ }, { "__id__": 25 + }, + { + "__id__": 27 } ], "_prefab": { - "__id__": 27 + "__id__": 29 }, "_lpos": { "__type__": "cc.Vec3", @@ -746,6 +749,28 @@ "__type__": "cc.CompPrefabInfo", "fileId": "c8/9vf9SlKEqfsJ1IxGxML" }, + { + "__type__": "545c05XsG9GDJispEGWKvYv", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "templateMode": false, + "watchPath": "data.item_box.name", + "labelType": "cc.Label", + "watchPathArr": [], + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e7WHecgShFn43utxq0pblj" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -769,7 +794,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 29 + "__id__": 31 }, "_contentSize": { "__type__": "cc.Size", @@ -810,20 +835,20 @@ }, "_children": [ { - "__id__": 32 + "__id__": 34 }, { - "__id__": 38 + "__id__": 40 } ], "_active": true, "_components": [ { - "__id__": 44 + "__id__": 48 } ], "_prefab": { - "__id__": 46 + "__id__": 50 }, "_lpos": { "__type__": "cc.Vec3", @@ -860,20 +885,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 31 + "__id__": 33 }, "_children": [], "_active": true, "_components": [ { - "__id__": 33 + "__id__": 35 }, { - "__id__": 35 + "__id__": 37 } ], "_prefab": { - "__id__": 37 + "__id__": 39 }, "_lpos": { "__type__": "cc.Vec3", @@ -910,11 +935,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 32 + "__id__": 34 }, "_enabled": true, "__prefab": { - "__id__": 34 + "__id__": 36 }, "_contentSize": { "__type__": "cc.Size", @@ -938,11 +963,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 32 + "__id__": 34 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 38 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -996,20 +1021,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 31 + "__id__": 33 }, "_children": [], "_active": true, "_components": [ { - "__id__": 39 + "__id__": 41 }, { - "__id__": 41 + "__id__": 43 + }, + { + "__id__": 45 } ], "_prefab": { - "__id__": 43 + "__id__": 47 }, "_lpos": { "__type__": "cc.Vec3", @@ -1046,11 +1074,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 40 + "__id__": 42 }, "_contentSize": { "__type__": "cc.Size", @@ -1074,11 +1102,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 42 + "__id__": 44 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1136,6 +1164,28 @@ "__type__": "cc.CompPrefabInfo", "fileId": "47lMoO5ltGC4dOtvHCkmw1" }, + { + "__type__": "545c05XsG9GDJispEGWKvYv", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": { + "__id__": 46 + }, + "templateMode": false, + "watchPath": "data.item_box.info", + "labelType": "cc.Label", + "watchPathArr": [], + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "e7hd0aQ6lL7r84V4SgRdOX" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -1155,11 +1205,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 31 + "__id__": 33 }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 49 }, "_contentSize": { "__type__": "cc.Size", @@ -1200,26 +1250,26 @@ }, "_children": [ { - "__id__": 48 + "__id__": 52 }, { - "__id__": 54 + "__id__": 58 }, { - "__id__": 60 + "__id__": 64 }, { - "__id__": 68 + "__id__": 72 } ], "_active": true, "_components": [ { - "__id__": 74 + "__id__": 78 } ], "_prefab": { - "__id__": 76 + "__id__": 80 }, "_lpos": { "__type__": "cc.Vec3", @@ -1256,20 +1306,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 47 + "__id__": 51 }, "_children": [], "_active": true, "_components": [ { - "__id__": 49 + "__id__": 53 }, { - "__id__": 51 + "__id__": 55 } ], "_prefab": { - "__id__": 53 + "__id__": 57 }, "_lpos": { "__type__": "cc.Vec3", @@ -1306,11 +1356,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 52 }, "_enabled": true, "__prefab": { - "__id__": 50 + "__id__": 54 }, "_contentSize": { "__type__": "cc.Size", @@ -1334,11 +1384,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 52 }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 56 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1392,20 +1442,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 47 + "__id__": 51 }, "_children": [], "_active": true, "_components": [ { - "__id__": 55 + "__id__": 59 }, { - "__id__": 57 + "__id__": 61 } ], "_prefab": { - "__id__": 59 + "__id__": 63 }, "_lpos": { "__type__": "cc.Vec3", @@ -1442,11 +1492,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 56 + "__id__": 60 }, "_contentSize": { "__type__": "cc.Size", @@ -1470,11 +1520,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 58 + "__id__": 62 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1528,23 +1578,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 47 + "__id__": 51 }, "_children": [], "_active": true, "_components": [ - { - "__id__": 61 - }, - { - "__id__": 63 - }, { "__id__": 65 + }, + { + "__id__": 67 + }, + { + "__id__": 69 } ], "_prefab": { - "__id__": 67 + "__id__": 71 }, "_lpos": { "__type__": "cc.Vec3", @@ -1581,11 +1631,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 60 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 66 }, "_contentSize": { "__type__": "cc.Size", @@ -1609,11 +1659,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 60 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 64 + "__id__": 68 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1677,14 +1727,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 60 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 66 + "__id__": 70 }, "templateMode": false, - "watchPath": "data.role.atk", + "watchPath": "data.item_box.atk", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -1712,20 +1762,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 47 + "__id__": 51 }, "_children": [], "_active": true, "_components": [ { - "__id__": 69 + "__id__": 73 }, { - "__id__": 71 + "__id__": 75 } ], "_prefab": { - "__id__": 73 + "__id__": 77 }, "_lpos": { "__type__": "cc.Vec3", @@ -1762,11 +1812,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 70 + "__id__": 74 }, "_contentSize": { "__type__": "cc.Size", @@ -1790,11 +1840,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 72 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 76 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1871,11 +1921,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 47 + "__id__": 51 }, "_enabled": true, "__prefab": { - "__id__": 75 + "__id__": 79 }, "_contentSize": { "__type__": "cc.Size", @@ -1916,26 +1966,26 @@ }, "_children": [ { - "__id__": 78 + "__id__": 82 }, { - "__id__": 84 + "__id__": 88 }, { - "__id__": 90 + "__id__": 94 }, { - "__id__": 98 + "__id__": 102 } ], "_active": true, "_components": [ { - "__id__": 104 + "__id__": 108 } ], "_prefab": { - "__id__": 106 + "__id__": 110 }, "_lpos": { "__type__": "cc.Vec3", @@ -1972,20 +2022,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 77 + "__id__": 81 }, "_children": [], "_active": true, "_components": [ { - "__id__": 79 + "__id__": 83 }, { - "__id__": 81 + "__id__": 85 } ], "_prefab": { - "__id__": 83 + "__id__": 87 }, "_lpos": { "__type__": "cc.Vec3", @@ -2022,11 +2072,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 78 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 80 + "__id__": 84 }, "_contentSize": { "__type__": "cc.Size", @@ -2050,11 +2100,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 78 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 82 + "__id__": 86 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2108,20 +2158,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 77 + "__id__": 81 }, "_children": [], "_active": true, "_components": [ { - "__id__": 85 + "__id__": 89 }, { - "__id__": 87 + "__id__": 91 } ], "_prefab": { - "__id__": 89 + "__id__": 93 }, "_lpos": { "__type__": "cc.Vec3", @@ -2158,11 +2208,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 84 + "__id__": 88 }, "_enabled": true, "__prefab": { - "__id__": 86 + "__id__": 90 }, "_contentSize": { "__type__": "cc.Size", @@ -2186,11 +2236,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 84 + "__id__": 88 }, "_enabled": true, "__prefab": { - "__id__": 88 + "__id__": 92 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2244,23 +2294,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 77 + "__id__": 81 }, "_children": [], "_active": true, "_components": [ - { - "__id__": 91 - }, - { - "__id__": 93 - }, { "__id__": 95 + }, + { + "__id__": 97 + }, + { + "__id__": 99 } ], "_prefab": { - "__id__": 97 + "__id__": 101 }, "_lpos": { "__type__": "cc.Vec3", @@ -2297,11 +2347,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 90 + "__id__": 94 }, "_enabled": true, "__prefab": { - "__id__": 92 + "__id__": 96 }, "_contentSize": { "__type__": "cc.Size", @@ -2325,11 +2375,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 90 + "__id__": 94 }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 98 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2393,14 +2443,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 90 + "__id__": 94 }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 100 }, "templateMode": false, - "watchPath": "data.role.atk_cd", + "watchPath": "data.item_box.atk_cd", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -2428,20 +2478,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 77 + "__id__": 81 }, "_children": [], "_active": true, "_components": [ { - "__id__": 99 + "__id__": 103 }, { - "__id__": 101 + "__id__": 105 } ], "_prefab": { - "__id__": 103 + "__id__": 107 }, "_lpos": { "__type__": "cc.Vec3", @@ -2478,11 +2528,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 102 }, "_enabled": true, "__prefab": { - "__id__": 100 + "__id__": 104 }, "_contentSize": { "__type__": "cc.Size", @@ -2506,11 +2556,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 102 }, "_enabled": true, "__prefab": { - "__id__": 102 + "__id__": 106 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2587,11 +2637,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 77 + "__id__": 81 }, "_enabled": true, "__prefab": { - "__id__": 105 + "__id__": 109 }, "_contentSize": { "__type__": "cc.Size", @@ -2632,26 +2682,26 @@ }, "_children": [ { - "__id__": 108 + "__id__": 112 }, { - "__id__": 114 + "__id__": 118 }, { - "__id__": 120 + "__id__": 124 }, { - "__id__": 128 + "__id__": 132 } ], "_active": true, "_components": [ { - "__id__": 134 + "__id__": 138 } ], "_prefab": { - "__id__": 136 + "__id__": 140 }, "_lpos": { "__type__": "cc.Vec3", @@ -2688,20 +2738,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 107 + "__id__": 111 }, "_children": [], "_active": true, "_components": [ { - "__id__": 109 + "__id__": 113 }, { - "__id__": 111 + "__id__": 115 } ], "_prefab": { - "__id__": 113 + "__id__": 117 }, "_lpos": { "__type__": "cc.Vec3", @@ -2738,11 +2788,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 108 + "__id__": 112 }, "_enabled": true, "__prefab": { - "__id__": 110 + "__id__": 114 }, "_contentSize": { "__type__": "cc.Size", @@ -2766,11 +2816,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 108 + "__id__": 112 }, "_enabled": true, "__prefab": { - "__id__": 112 + "__id__": 116 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2824,20 +2874,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 107 + "__id__": 111 }, "_children": [], "_active": true, "_components": [ { - "__id__": 115 + "__id__": 119 }, { - "__id__": 117 + "__id__": 121 } ], "_prefab": { - "__id__": 119 + "__id__": 123 }, "_lpos": { "__type__": "cc.Vec3", @@ -2874,11 +2924,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 114 + "__id__": 118 }, "_enabled": true, "__prefab": { - "__id__": 116 + "__id__": 120 }, "_contentSize": { "__type__": "cc.Size", @@ -2902,11 +2952,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 114 + "__id__": 118 }, "_enabled": true, "__prefab": { - "__id__": 118 + "__id__": 122 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2960,23 +3010,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 107 + "__id__": 111 }, "_children": [], "_active": true, "_components": [ - { - "__id__": 121 - }, - { - "__id__": 123 - }, { "__id__": 125 + }, + { + "__id__": 127 + }, + { + "__id__": 129 } ], "_prefab": { - "__id__": 127 + "__id__": 131 }, "_lpos": { "__type__": "cc.Vec3", @@ -3013,11 +3063,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 120 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 122 + "__id__": 126 }, "_contentSize": { "__type__": "cc.Size", @@ -3041,11 +3091,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 120 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 124 + "__id__": 128 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3109,14 +3159,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 120 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 126 + "__id__": 130 }, "templateMode": false, - "watchPath": "data.role.power", + "watchPath": "data.item_box.skillsd", "labelType": "cc.Label", "watchPathArr": [], "_id": "" @@ -3144,20 +3194,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 107 + "__id__": 111 }, "_children": [], "_active": true, "_components": [ { - "__id__": 129 + "__id__": 133 }, { - "__id__": 131 + "__id__": 135 } ], "_prefab": { - "__id__": 133 + "__id__": 137 }, "_lpos": { "__type__": "cc.Vec3", @@ -3194,11 +3244,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 128 + "__id__": 132 }, "_enabled": true, "__prefab": { - "__id__": 130 + "__id__": 134 }, "_contentSize": { "__type__": "cc.Size", @@ -3222,11 +3272,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 128 + "__id__": 132 }, "_enabled": true, "__prefab": { - "__id__": 132 + "__id__": 136 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3303,11 +3353,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 107 + "__id__": 111 }, "_enabled": true, "__prefab": { - "__id__": 135 + "__id__": 139 }, "_contentSize": { "__type__": "cc.Size", @@ -3350,11 +3400,11 @@ "_active": true, "_components": [ { - "__id__": 138 + "__id__": 142 } ], "_prefab": { - "__id__": 140 + "__id__": 144 }, "_lpos": { "__type__": "cc.Vec3", @@ -3391,11 +3441,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 137 + "__id__": 141 }, "_enabled": true, "__prefab": { - "__id__": 139 + "__id__": 143 }, "_contentSize": { "__type__": "cc.Size", @@ -3436,7 +3486,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 142 + "__id__": 146 }, "_contentSize": { "__type__": "cc.Size", @@ -3477,7 +3527,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 145 + "__id__": 149 }, "_contentSize": { "__type__": "cc.Size", @@ -3505,7 +3555,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 147 + "__id__": 151 }, "_alignFlags": 40, "_target": null, @@ -3541,25 +3591,25 @@ }, "_enabled": true, "__prefab": { - "__id__": 149 + "__id__": 153 }, "n_name": { "__id__": 9 }, "n_hp": { - "__id__": 137 + "__id__": 141 }, "n_atk": { - "__id__": 47 + "__id__": 51 }, "n_info": { - "__id__": 31 + "__id__": 33 }, "n_atk_cd": { - "__id__": 77 + "__id__": 81 }, "n_skillcd": { - "__id__": 107 + "__id__": 111 }, "_id": "" }, diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index bc44aa8e..93bf3eb1 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -93,6 +93,16 @@ export class SingletonModuleComp extends ecs.Comp { max: 5, speed:1, }, + item_box:{ + hp:0, + atk:0, + atk_cd:0, + power:0, + name:"", + skillcd:0, + skillsd:0, + info:"", + } }; vmAdd() { diff --git a/assets/script/game/common/config/CardSet.ts b/assets/script/game/common/config/CardSet.ts index 14b27253..baf01ced 100644 --- a/assets/script/game/common/config/CardSet.ts +++ b/assets/script/game/common/config/CardSet.ts @@ -1,13 +1,7 @@ /* - * @Author: dgflash - * @Date: 2021-11-23 15:28:39 - * @LastEditors: dgflash - * @LastEditTime: 2022-01-26 16:42:00 + CardList type: 1:精灵 2:技能 3:装备 */ -export const CardType = { - 1: "前排", - 2: "后排", -} + export const CardList={ 1:[ {uuid:1101,type:1},{uuid:1102,type:1},{uuid:1201,type:1},{uuid:1202,type:1},{uuid:1301,type:1},{uuid:1302,type:1}, @@ -38,6 +32,10 @@ export const CardList={ // 5:[5001,5002,5003,5004], } +/* + CardSet type: 1:近战 2:远程 3:法术 暂定 + */ + export const CardSet = { 1101:{uuid: 1101,path: "1101",type: 1,level: 1,name: "守护犬",atk: 4,hp: 8,atk_cd: 2,power: 50,speed: 80,skill: "base",max_skill: "base",int1: null,int2: null,dps: 2,word: "守护", info: "自身护盾",atktype: "攻击型", mon: "狗"}, 1102:{uuid: 1102,path: "1102",type: 1,level: 1,name: "狂暴犬",atk: 4,hp: 8,atk_cd: 2,power: 50,speed: 80,skill: "base",max_skill: "base",int1: null,int2: null,dps: 2,word: "狂暴", info: "全体攻击",atktype: "攻击型", mon: "狗"}, diff --git a/assets/script/game/monster/HeroCardViewComp.ts b/assets/script/game/monster/HeroCardViewComp.ts index ef0147c7..570b33ad 100644 --- a/assets/script/game/monster/HeroCardViewComp.ts +++ b/assets/script/game/monster/HeroCardViewComp.ts @@ -61,8 +61,19 @@ export class HeroCardViewComp extends CCComp { onTouchMove(event: EventTouch) { let delta = event.getDelta(); this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y); + this.show_info() + } + show_info(){ let parent = this.node.parent.parent - parent.getChildByName("item_box").active=true + if(this.card_type == 2){ + smc.vm_data.item_box.info = SkillSet[this.card_uid].info + smc.vm_data.item_box.name = SkillSet[this.card_uid].name + smc.vm_data.item_box.skillcd = SkillSet[this.card_uid].cd + smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd + smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk + smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp + parent.getChildByName("item_box").active=true + } } onTouchEnd(){ if(this.node.position.y-this.pos_y > 150){