From a66e61c313dd14307617b4da75894731e02a3fd9 Mon Sep 17 00:00:00 2001 From: panw Date: Mon, 30 Dec 2024 16:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2buff=20=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E4=BA=A4=E7=94=B1=20buffcomp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/game/heros/a1.prefab | 156 +++++--- assets/resources/game/heros/a2.prefab | 23 +- assets/resources/game/heros/a3.prefab | 23 +- assets/resources/game/heros/k1.prefab | 23 +- assets/resources/game/heros/k2.prefab | 23 +- assets/resources/game/heros/k3.prefab | 23 +- assets/resources/game/heros/mor1.prefab | 23 +- assets/resources/game/heros/mor2.prefab | 23 +- assets/resources/game/heros/mor3.prefab | 23 +- assets/resources/game/heros/pd1.prefab | 23 +- assets/resources/game/heros/top.prefab | 30 +- assets/resources/game/skills/tooltip.prefab | 332 +++++------------- assets/resources/gui/font.meta | 9 + .../gui/font/Kenney Future Narrow.ttf | Bin 0 -> 34180 bytes .../gui/font/Kenney Future Narrow.ttf.meta | 12 + assets/resources/gui/font/Kenney Future.ttf | Bin 0 -> 34160 bytes .../resources/gui/font/Kenney Future.ttf.meta | 12 + assets/script/game/hero/BuffComp.ts | 159 ++++++++- assets/script/game/hero/HeroViewComp.ts | 85 +---- assets/script/game/skills/TooltipCom.ts | 4 +- 20 files changed, 606 insertions(+), 400 deletions(-) create mode 100644 assets/resources/gui/font.meta create mode 100644 assets/resources/gui/font/Kenney Future Narrow.ttf create mode 100644 assets/resources/gui/font/Kenney Future Narrow.ttf.meta create mode 100644 assets/resources/gui/font/Kenney Future.ttf create mode 100644 assets/resources/gui/font/Kenney Future.ttf.meta diff --git a/assets/resources/game/heros/a1.prefab b/assets/resources/game/heros/a1.prefab index e5db1cf1..ec0dac61 100644 --- a/assets/resources/game/heros/a1.prefab +++ b/assets/resources/game/heros/a1.prefab @@ -37,20 +37,17 @@ "__id__": 52 }, { - "__id__": 63 + "__id__": 65 }, { - "__id__": 72 + "__id__": 74 }, { - "__id__": 82 + "__id__": 84 } ], "_active": true, "_components": [ - { - "__id__": 91 - }, { "__id__": 93 }, @@ -62,10 +59,16 @@ }, { "__id__": 99 + }, + { + "__id__": 101 + }, + { + "__id__": 103 } ], "_prefab": { - "__id__": 101 + "__id__": 105 }, "_lpos": { "__type__": "cc.Vec3", @@ -906,6 +909,9 @@ }, { "__id__": 62 + }, + { + "__id__": 63 } ], "removedComponents": [] @@ -1008,6 +1014,22 @@ "z": 1 } }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 64 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "dfDOq9MhxDoay0LMIRMSnQ" + ] + }, { "__type__": "cc.Node", "_objFlags": 0, @@ -1015,14 +1037,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 64 + "__id__": 66 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 63 + "__id__": 65 }, "asset": { "__uuid__": "5b4ca49e-0f12-4478-b56d-bf8198b36b90", @@ -1030,7 +1052,7 @@ }, "fileId": "0d6ZXmA5dHkZxoGONDL2sE", "instance": { - "__id__": 65 + "__id__": 67 }, "targetOverrides": null }, @@ -1043,20 +1065,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 66 - }, { "__id__": 68 }, - { - "__id__": 69 - }, { "__id__": 70 }, { "__id__": 71 + }, + { + "__id__": 72 + }, + { + "__id__": 73 } ], "removedComponents": [] @@ -1064,7 +1086,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 67 + "__id__": 69 }, "propertyPath": [ "_name" @@ -1080,7 +1102,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 67 + "__id__": 69 }, "propertyPath": [ "_lpos" @@ -1095,7 +1117,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 67 + "__id__": 69 }, "propertyPath": [ "_lrot" @@ -1111,7 +1133,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 67 + "__id__": 69 }, "propertyPath": [ "_euler" @@ -1126,7 +1148,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 67 + "__id__": 69 }, "propertyPath": [ "_active" @@ -1140,14 +1162,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 73 + "__id__": 75 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 72 + "__id__": 74 }, "asset": { "__uuid__": "ec11e9f5-3347-4d5e-8ed8-f98a6ac7963a", @@ -1155,7 +1177,7 @@ }, "fileId": "c46/YsCPVOJYA4mWEpNYRx", "instance": { - "__id__": 74 + "__id__": 76 }, "targetOverrides": null }, @@ -1168,15 +1190,9 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 75 - }, { "__id__": 77 }, - { - "__id__": 78 - }, { "__id__": 79 }, @@ -1185,6 +1201,12 @@ }, { "__id__": 81 + }, + { + "__id__": 82 + }, + { + "__id__": 83 } ], "removedComponents": [] @@ -1192,7 +1214,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_name" @@ -1208,7 +1230,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_lpos" @@ -1223,7 +1245,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_lrot" @@ -1239,7 +1261,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_euler" @@ -1254,7 +1276,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_lscale" @@ -1269,7 +1291,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 76 + "__id__": 78 }, "propertyPath": [ "_active" @@ -1283,14 +1305,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 83 + "__id__": 85 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 82 + "__id__": 84 }, "asset": { "__uuid__": "ae4493bd-cbcc-4392-921c-3e2b0fcd5338", @@ -1298,7 +1320,7 @@ }, "fileId": "91yoyAQGNDm5ziI7NUChZ+", "instance": { - "__id__": 84 + "__id__": 86 }, "targetOverrides": null }, @@ -1311,20 +1333,20 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 85 - }, { "__id__": 87 }, - { - "__id__": 88 - }, { "__id__": 89 }, { "__id__": 90 + }, + { + "__id__": 91 + }, + { + "__id__": 92 } ], "removedComponents": [] @@ -1332,7 +1354,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 86 + "__id__": 88 }, "propertyPath": [ "_name" @@ -1348,7 +1370,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 86 + "__id__": 88 }, "propertyPath": [ "_lpos" @@ -1363,7 +1385,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 86 + "__id__": 88 }, "propertyPath": [ "_lrot" @@ -1379,7 +1401,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 86 + "__id__": 88 }, "propertyPath": [ "_euler" @@ -1394,7 +1416,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 86 + "__id__": 88 }, "propertyPath": [ "_active" @@ -1411,7 +1433,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 92 + "__id__": 94 }, "_contentSize": { "__type__": "cc.Size", @@ -1439,7 +1461,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 96 }, "enabledContactListener": true, "bullet": true, @@ -1473,7 +1495,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 98 }, "tag": 0, "_group": 4, @@ -1507,7 +1529,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 98 + "__id__": 100 }, "anm": { "__id__": 37 @@ -1528,7 +1550,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 100 + "__id__": 102 }, "_id": "" }, @@ -1536,6 +1558,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 104 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "a8CP/9WcBLCoA9qiTrhje0" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -1549,13 +1589,13 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": [ { - "__id__": 82 + "__id__": 84 }, { - "__id__": 72 + "__id__": 74 }, { - "__id__": 63 + "__id__": 65 }, { "__id__": 52 diff --git a/assets/resources/game/heros/a2.prefab b/assets/resources/game/heros/a2.prefab index cfa01506..56ef548d 100644 --- a/assets/resources/game/heros/a2.prefab +++ b/assets/resources/game/heros/a2.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "21jLhujYtE3L53C6d12rZw" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/a3.prefab b/assets/resources/game/heros/a3.prefab index 30f2965b..ddf46de5 100644 --- a/assets/resources/game/heros/a3.prefab +++ b/assets/resources/game/heros/a3.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "654wWWbWpMeYe/ywRBGTMP" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/k1.prefab b/assets/resources/game/heros/k1.prefab index 33b3c5b8..66f4bf66 100644 --- a/assets/resources/game/heros/k1.prefab +++ b/assets/resources/game/heros/k1.prefab @@ -65,10 +65,13 @@ }, { "__id__": 107 + }, + { + "__id__": 109 } ], "_prefab": { - "__id__": 109 + "__id__": 111 }, "_lpos": { "__type__": "cc.Vec3", @@ -1707,6 +1710,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 110 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "10VrAD+6ZHFL/QSsD3uQDW" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/k2.prefab b/assets/resources/game/heros/k2.prefab index 6d90a898..68ea6ce6 100644 --- a/assets/resources/game/heros/k2.prefab +++ b/assets/resources/game/heros/k2.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "deHm1o9KpB17FL6fhKz71A" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/k3.prefab b/assets/resources/game/heros/k3.prefab index acc8b9db..ae009a0a 100644 --- a/assets/resources/game/heros/k3.prefab +++ b/assets/resources/game/heros/k3.prefab @@ -62,10 +62,13 @@ }, { "__id__": 102 + }, + { + "__id__": 104 } ], "_prefab": { - "__id__": 104 + "__id__": 106 }, "_lpos": { "__type__": "cc.Vec3", @@ -1568,6 +1571,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 105 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "eeT0+fdzJLMq160CxwU2LG" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/mor1.prefab b/assets/resources/game/heros/mor1.prefab index fd117222..e5fb094c 100644 --- a/assets/resources/game/heros/mor1.prefab +++ b/assets/resources/game/heros/mor1.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "5f5QAbqFdD3Ju5WYV7hPI8" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "71yWFptsBBdLhbljkpsiBt" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/mor2.prefab b/assets/resources/game/heros/mor2.prefab index 3665a9a0..c9e7073a 100644 --- a/assets/resources/game/heros/mor2.prefab +++ b/assets/resources/game/heros/mor2.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "5f5QAbqFdD3Ju5WYV7hPI8" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2elZ4bl4FIB4b+pDLWapI5" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/mor3.prefab b/assets/resources/game/heros/mor3.prefab index 8e28636c..147ad4f0 100644 --- a/assets/resources/game/heros/mor3.prefab +++ b/assets/resources/game/heros/mor3.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "5f5QAbqFdD3Ju5WYV7hPI8" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "b8ibchQPNNBZ5E+NDTaDMb" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/pd1.prefab b/assets/resources/game/heros/pd1.prefab index 35b52586..abf3b30e 100644 --- a/assets/resources/game/heros/pd1.prefab +++ b/assets/resources/game/heros/pd1.prefab @@ -62,10 +62,13 @@ }, { "__id__": 99 + }, + { + "__id__": 101 } ], "_prefab": { - "__id__": 101 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1536,6 +1539,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "ae2ywFEqlJ26Sq7z7AtGgk" }, + { + "__type__": "7eb34NR6XVEf78HCi5eAKLm", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 102 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "cex4XP3BdLu4w/1NSQ5tWB" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 7bb26ee2..262c3a42 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -112,7 +112,7 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, + "x": 1.1, "y": 1, "z": 1 }, @@ -149,7 +149,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -29, + "x": -30, "y": 0, "z": 0 }, @@ -190,8 +190,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 58, - "height": 13 + "width": 60, + "height": 15 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -449,7 +449,7 @@ "a": 255 }, "_spriteFrame": { - "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@984ba", + "__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@2be5f", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -608,8 +608,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, + "x": 0.8, + "y": 0.8, "z": 1 }, "_mobility": 0, @@ -744,8 +744,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, + "x": 0.8, + "y": 0.8, "z": 1 }, "_mobility": 0, @@ -880,8 +880,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, + "x": 0.8, + "y": 0.8, "z": 1 }, "_mobility": 0, @@ -1016,8 +1016,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, + "x": 0.8, + "y": 0.8, "z": 1 }, "_mobility": 0, @@ -1152,8 +1152,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1, - "y": 1, + "x": 0.8, + "y": 0.8, "z": 1 }, "_mobility": 0, diff --git a/assets/resources/game/skills/tooltip.prefab b/assets/resources/game/skills/tooltip.prefab index 15cde72a..6b95f245 100644 --- a/assets/resources/game/skills/tooltip.prefab +++ b/assets/resources/game/skills/tooltip.prefab @@ -25,26 +25,26 @@ "__id__": 12 }, { - "__id__": 28 + "__id__": 22 }, { - "__id__": 38 + "__id__": 32 }, { - "__id__": 54 + "__id__": 48 } ], "_active": true, "_components": [ { - "__id__": 64 + "__id__": 58 }, { - "__id__": 66 + "__id__": 60 } ], "_prefab": { - "__id__": 68 + "__id__": 62 }, "_lpos": { "__type__": "cc.Vec3", @@ -190,8 +190,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 35.369140625, - "height": 39.8 + "width": 37.369140625, + "height": 41.8 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -221,9 +221,9 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 121, - "g": 121, - "b": 121, + "r": 255, + "g": 255, + "b": 255, "a": 255 }, "_string": "10", @@ -239,19 +239,19 @@ "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, - "_cacheMode": 0, + "_cacheMode": 1, "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", "r": 255, - "g": 255, - "b": 255, + "g": 0, + "b": 0, "a": 255 }, - "_outlineWidth": 1, + "_outlineWidth": 2, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -337,19 +337,16 @@ "_children": [ { "__id__": 13 - }, - { - "__id__": 19 } ], "_active": false, "_components": [ { - "__id__": 25 + "__id__": 19 } ], "_prefab": { - "__id__": 27 + "__id__": 21 }, "_lpos": { "__type__": "cc.Vec3", @@ -444,8 +441,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 26.24609375, - "height": 54.4 + "width": 52.4921875, + "height": 58.4 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -475,15 +472,15 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 22, - "g": 231, - "b": 39, + "r": 255, + "g": 255, + "b": 255, "a": 255 }, "_string": "10", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, + "_actualFontSize": 40, "_fontSize": 40, "_fontFamily": "Arial", "_lineHeight": 40, @@ -500,12 +497,12 @@ "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", - "r": 255, + "r": 82, "g": 255, - "b": 255, + "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 4, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -539,165 +536,6 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": null }, - { - "__type__": "cc.Node", - "_name": "+", - "_objFlags": 0, - "__editorExtras__": {}, - "_parent": { - "__id__": 12 - }, - "_children": [], - "_active": true, - "_components": [ - { - "__id__": 20 - }, - { - "__id__": 22 - } - ], - "_prefab": { - "__id__": 24 - }, - "_lpos": { - "__type__": "cc.Vec3", - "x": -18.702999999999975, - "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": 1073741824, - "_euler": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_id": "" - }, - { - "__type__": "cc.UITransform", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 19 - }, - "_enabled": true, - "__prefab": { - "__id__": 21 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 15.6796875, - "height": 54.4 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "87FEhNM7RMVqLclVqADNPz" - }, - { - "__type__": "cc.Label", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 19 - }, - "_enabled": true, - "__prefab": { - "__id__": 23 - }, - "_customMaterial": null, - "_srcBlendFactor": 2, - "_dstBlendFactor": 4, - "_color": { - "__type__": "cc.Color", - "r": 13, - "g": 243, - "b": 59, - "a": 255 - }, - "_string": "+", - "_horizontalAlign": 1, - "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 40, - "_fontFamily": "Arial", - "_lineHeight": 40, - "_overflow": 0, - "_enableWrapText": true, - "_font": null, - "_isSystemFontUsed": true, - "_spacingX": 0, - "_isItalic": false, - "_isBold": false, - "_isUnderline": false, - "_underlineHeight": 2, - "_cacheMode": 0, - "_enableOutline": true, - "_outlineColor": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_outlineWidth": 2, - "_enableShadow": false, - "_shadowColor": { - "__type__": "cc.Color", - "r": 0, - "g": 0, - "b": 0, - "a": 255 - }, - "_shadowOffset": { - "__type__": "cc.Vec2", - "x": 2, - "y": 2 - }, - "_shadowBlur": 2, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "edXhx12K5KqY9dBp17uu3z" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "bdzwPhf5tDxb3Sb9sEuEPx", - "instance": null, - "targetOverrides": null, - "nestedPrefabInstanceRoots": null - }, { "__type__": "cc.UITransform", "_name": "", @@ -708,7 +546,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 26 + "__id__": 20 }, "_contentSize": { "__type__": "cc.Size", @@ -749,17 +587,17 @@ }, "_children": [ { - "__id__": 29 + "__id__": 23 } ], "_active": false, "_components": [ { - "__id__": 35 + "__id__": 29 } ], "_prefab": { - "__id__": 37 + "__id__": 31 }, "_lpos": { "__type__": "cc.Vec3", @@ -796,20 +634,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 28 + "__id__": 22 }, "_children": [], "_active": true, "_components": [ { - "__id__": 30 + "__id__": 24 }, { - "__id__": 32 + "__id__": 26 } ], "_prefab": { - "__id__": 34 + "__id__": 28 }, "_lpos": { "__type__": "cc.Vec3", @@ -846,11 +684,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 29 + "__id__": 23 }, "_enabled": true, "__prefab": { - "__id__": 31 + "__id__": 25 }, "_contentSize": { "__type__": "cc.Size", @@ -874,11 +712,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 29 + "__id__": 23 }, "_enabled": true, "__prefab": { - "__id__": 33 + "__id__": 27 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -955,11 +793,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 28 + "__id__": 22 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 30 }, "_contentSize": { "__type__": "cc.Size", @@ -1000,20 +838,20 @@ }, "_children": [ { - "__id__": 39 + "__id__": 33 }, { - "__id__": 45 + "__id__": 39 } ], "_active": false, "_components": [ { - "__id__": 51 + "__id__": 45 } ], "_prefab": { - "__id__": 53 + "__id__": 47 }, "_lpos": { "__type__": "cc.Vec3", @@ -1050,20 +888,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 38 + "__id__": 32 }, "_children": [], "_active": true, "_components": [ { - "__id__": 40 + "__id__": 34 }, { - "__id__": 42 + "__id__": 36 } ], "_prefab": { - "__id__": 44 + "__id__": 38 }, "_lpos": { "__type__": "cc.Vec3", @@ -1100,11 +938,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 33 }, "_enabled": true, "__prefab": { - "__id__": 41 + "__id__": 35 }, "_contentSize": { "__type__": "cc.Size", @@ -1128,11 +966,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 33 }, "_enabled": true, "__prefab": { - "__id__": 43 + "__id__": 37 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1140,8 +978,8 @@ "_color": { "__type__": "cc.Color", "r": 255, - "g": 0, - "b": 0, + "g": 255, + "b": 255, "a": 255 }, "_string": "-10", @@ -1157,7 +995,7 @@ "_isSystemFontUsed": true, "_spacingX": 0, "_isItalic": false, - "_isBold": false, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, @@ -1165,11 +1003,11 @@ "_outlineColor": { "__type__": "cc.Color", "r": 255, - "g": 255, - "b": 255, + "g": 0, + "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 5, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -1209,20 +1047,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 38 + "__id__": 32 }, "_children": [], "_active": false, "_components": [ { - "__id__": 46 + "__id__": 40 }, { - "__id__": 48 + "__id__": 42 } ], "_prefab": { - "__id__": 50 + "__id__": 44 }, "_lpos": { "__type__": "cc.Vec3", @@ -1259,11 +1097,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 45 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 47 + "__id__": 41 }, "_contentSize": { "__type__": "cc.Size", @@ -1287,11 +1125,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 45 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 49 + "__id__": 43 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1368,11 +1206,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 32 }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 46 }, "_contentSize": { "__type__": "cc.Size", @@ -1399,6 +1237,8 @@ "__id__": 0 }, "fileId": "20vKhpGcBEoKbUIhLvPmd1", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -1411,17 +1251,17 @@ }, "_children": [ { - "__id__": 55 + "__id__": 49 } ], "_active": false, "_components": [ { - "__id__": 61 + "__id__": 55 } ], "_prefab": { - "__id__": 63 + "__id__": 57 }, "_lpos": { "__type__": "cc.Vec3", @@ -1458,20 +1298,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 54 + "__id__": 48 }, "_children": [], "_active": true, "_components": [ { - "__id__": 56 + "__id__": 50 }, { - "__id__": 58 + "__id__": 52 } ], "_prefab": { - "__id__": 60 + "__id__": 54 }, "_lpos": { "__type__": "cc.Vec3", @@ -1508,11 +1348,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 49 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 51 }, "_contentSize": { "__type__": "cc.Size", @@ -1536,11 +1376,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 49 }, "_enabled": true, "__prefab": { - "__id__": 59 + "__id__": 53 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1617,11 +1457,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 48 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 56 }, "_contentSize": { "__type__": "cc.Size", @@ -1662,7 +1502,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 65 + "__id__": 59 }, "_contentSize": { "__type__": "cc.Size", @@ -1690,7 +1530,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 67 + "__id__": 61 }, "_id": "" }, diff --git a/assets/resources/gui/font.meta b/assets/resources/gui/font.meta new file mode 100644 index 00000000..898e50f4 --- /dev/null +++ b/assets/resources/gui/font.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.2.0", + "importer": "directory", + "imported": true, + "uuid": "4dc4b992-a57a-436f-9db7-48102aea8387", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/gui/font/Kenney Future Narrow.ttf b/assets/resources/gui/font/Kenney Future Narrow.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c4cc8a05e115883e7f5312018613874cc5d9afd8 GIT binary patch literal 34180 zcmeHQYm8l2bzXPw%-D&Y#EDH}a2_X491O%B$95n|1D#-FC^#f_s7Z^fFdkpe44xNr z$JnN{J))_^k03=Vs`wEhS|Js+rV1)mQB_q_mA0sjS_J$k52+R}AvI7`6$ugW?f0#< zU*~b>+#wbeI_G-dv(MgZul23RUVEQ&?;T4^M6Q-x+LAr;*x3Hg(EhKAw05KQos)AD zi@*1~UqF5Md6Z|SW-pxn>nE1)71{hfkwuyAOq_bj!`U=wFQUA98V#fGANg<8zkzb+ z^xX3KKlsNVkAvR_MB1lj7bYj7T<9*#j2sa8{Zs50Vnz9jr)GzrxbDI40}~oVzVyueS%2>3J!$9d9M>CVNJr?H zHrhe|TrY1OMK3v}$CtF_OY&P7#bYS#w3ha!*3&W~!$Ypq&LBJ>&ym8ghJ0(61u@IT;T& z0FO{V+RJGN>d3Z$#kB<+xjxcqIqG!5*^g14xaL`T;q3bw&wXgU-HbP|5-()bm4crV z8jrbdOlTWaejhsJ)2GkNSA3*F30P70_VVYHo^@|aZw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zlQK-Uh@?|uh<|~rU~%m2fE*eVHyT~ zHCNh-T4YdGl`VPnf>*cR8+9>U@{sqGkBJpMih}*

KsMjcYU}}SI{7eh1k;B z|&&jYL@&_>Tq+_BFD* z^|!8mt?X@m%hk8aD~7gN9fTW)UW+|qYZy6D-Zbbo}HOp&d$v&Pbd5ice*oE^PQ#aRHr++G_$x2h!13kW*6o=6bz=vJCn-` zOPPV)TjXDlBmo9)-LdZU!nv{g_Z>WV@V>D#YUw?v)w+A;)u4@B7M2{71NR@;?|B?r z>P#%pyr+{LT9})InCzkD<)xXEXQ@H<*!09wCwpji=1hm&VXR3<4oi`G@50j5*zC+? zXTIC%j-9-)r#mrrVDG-MBjk8;W-5F4*@?+BGxJl~dpnEM7nZu&yB1)*xeGAm`Rrup z)S+`{9-cgYPZxi(VFCZs=LK1k8JUu4S(Z%RA{|V+dAwi1)qdG0_u%IE>g?uH&k;Eb z`m-3@S*0hFx8naXUBYWY&LJgqAm^;iYFklK%C9(TP`a$d|2U*ANf){;K%WeH?1eTd zw>^?d-BZANL`N;lW6*L5m?zabGvJp2eWtAwatbo$RGTwsTaeRuuN%1+;}<|l8!yA= zU3oyp@H*|Jbd{e;@w5rjRjpsJR(1;zoC6}_JPF)0ur~dA4z*>-ug7<_9EK*e)s*^v z33Sx03*3y3MT|8&K7gJ>;7OZyP&b_oD=khtEnp1g#0c5j5J79POTE<$T^Ba(LQ6*5 z7`_s}PY&wqK3tsvIv?44VEKq{587jtzIZIuzlh`jupGc_D&sf=$_`}Hy6;hYa!$_S zMf=i+5223{IHTV5UdRxa(~6lscnJQOQT;r2i!S;u>Pf((nlIn5`G%=2hJ d3A$5=qjMPhFgP5??CiSFMzKPl=JUAf@xQoKN#y_l literal 0 HcmV?d00001 diff --git a/assets/resources/gui/font/Kenney Future Narrow.ttf.meta b/assets/resources/gui/font/Kenney Future Narrow.ttf.meta new file mode 100644 index 00000000..7f35c3db --- /dev/null +++ b/assets/resources/gui/font/Kenney Future Narrow.ttf.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.0.1", + "importer": "ttf-font", + "imported": true, + "uuid": "f3fe241e-64e7-4f53-a4e4-734bf71b42bf", + "files": [ + ".json", + "Kenney Future Narrow.ttf" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/resources/gui/font/Kenney Future.ttf b/assets/resources/gui/font/Kenney Future.ttf new file mode 100644 index 0000000000000000000000000000000000000000..17e2b6cf996828e9c44dc27053ceb92fe1192ee6 GIT binary patch literal 34160 zcmeHQU5s5d!y+66!;*pgcV>eeU>wTzO$p&b_#J9{fHfGI(ry_UM?rb^S$=%XmF`a_sCW`M!Jv{cAwqo*6qi-roDg zuZeu*8zQSeerk4pL8fGn$X`6nej!$rXIG#5$M;`#@6Uh<4I|cyYs4!T&kvAm9Qv`(xEZ%d;YHeO%;r^xqDCJAi2iu6M3S0qxEgMMl7HvL=zse*6ySOX zWR7k^LHm6dMc#?_cb-D|ipc&?iyVOL13wq}ozICJJS_4q$h`k{k#`>xdCwY@FNr*W zF%LW?^4?7%53WZ6?fWq9eP0!M2y_n%3fg}6d67rHDe@?AJhl(z=OVxNq{tzRKZN$* z|Eb7fv>yhh!xu#U;5m^${4NfI9E&42p=8B!74Zm?`pZVf*AZ;_-AH|S5(sZ_*wNY zI$!I2xAR@{#Iar8D0`KbSB31=7S^Tn9lXAQwt}2o3)mgkT5L4xag2X_Z8-I20>&2+{*S`Zcs*hilY}V3RPZ){=1Oh_X$qQJ^sRrj_ts zKqm-NZdNCbToNdLjMoq4dW8K35C=S6?8qo4x6D>Q!04Z7i}F!xCi{UHW5PU9ckAGS zt%{15$`JR*gKo4@s%IB^u= zObQjuHgurQmt`|zX9ua#r{Hu(fv)p)%*OAqoiy|u?1She1UAAF?7%zuM?NK*z_(1J zF>odMV2m>32^@I1$qHWBJVy=PW<(NpqM4yxo-=*sD&z7S$rvjbo#NJKZc{{1TZ~ZM zYLVyIvItQPRJY5h8;zuTfs67e$xzVfiG0j{>gO%I(6M|=ob0M;t|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ets/resources/gui/font/Kenney Future.ttf.meta new file mode 100644 index 00000000..fac57433 --- /dev/null +++ b/assets/resources/gui/font/Kenney Future.ttf.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.0.1", + "importer": "ttf-font", + "imported": true, + "uuid": "e8d0427b-1682-4837-8391-20cd02ac0713", + "files": [ + ".json", + "Kenney Future.ttf" + ], + "subMetas": {}, + "userData": {} +} diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index dc9003b7..51dd176d 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -1,17 +1,170 @@ -import { _decorator, Component, Node } from 'cc'; +import { _decorator, Component, instantiate, Label, Node, Prefab, ProgressBar, v3 } from 'cc'; import { HeroViewComp } from './HeroViewComp'; +import { oops } from 'db://oops-framework/core/Oops'; +import { ecs } from 'db://oops-framework/libs/ecs/ECS'; +import { Tooltip } from '../skills/Tooltip'; const { ccclass, property } = _decorator; @ccclass('BuffComp') export class BuffComp extends Component { heroView: any=null; - buff_node:any=null; + ap_node:any=null; + cd_node:any=null; + def_node:any=null; + hp_node:any=null; + crit_node:any=null; + ap_cd:number=0; + cd_cd:number=0; + def_cd:number=0; + hp_cd:number=0; + crit_cd:number=0; + s_index=0 + speek_time:number=0; + start() { this.heroView = this.node.getComponent(HeroViewComp); + this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = false; } update(deltaTime: number) { - + if(this.ap_cd > 0 ) this.ap_cd -= deltaTime; + if(this.ap_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active){ + this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").setSiblingIndex(0); + this.s_index-- + if(this.s_index< 0) this.s_index=0 + } + + if(this.cd_cd > 0 ) this.cd_cd -= deltaTime; + if(this.cd_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active) { + this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").setSiblingIndex(0); + this.s_index-- + if(this.s_index< 0) this.s_index=0 + } + + if(this.def_cd > 0 ) this.def_cd -= deltaTime; + if(this.def_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active){ + this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("def").setSiblingIndex(0); + this.s_index-- + if(this.s_index< 0) this.s_index=0 + } + + if(this.hp_cd > 0 ) this.hp_cd -= deltaTime; + if(this.hp_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active){ + this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").setSiblingIndex(0); + this.s_index-- + if(this.s_index< 0) this.s_index=0 + } + + if(this.crit_cd > 0 ) this.crit_cd -= deltaTime; + if(this.crit_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active){ + this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = false; + this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").setSiblingIndex(0); + this.s_index-- + if(this.s_index< 0) this.s_index=0 + } + + + this.hp_show() + this.in_speek(deltaTime) + if(this.heroView.shield > 0){ + this.node.getChildByName("shielded").active=true + }else{ + this.node.getChildByName("shielded").active=false + } + + } + show_ap(t:number=2){ + this.ap_cd = t; + this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = true; + this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").setSiblingIndex(this.s_index); + console.log("show_ap",this.node.getChildByName("top").getChildByName("buff").getChildByName("ap")) + this.s_index++ + } + show_cd(t:number=2){ + this.cd_cd = t; + this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = true; + this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").setSiblingIndex(this.s_index); + this.s_index++ + } + show_def(t:number=2){ + this.def_cd = t; + this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = true; + this.node.getChildByName("top").getChildByName("buff").getChildByName("def").setSiblingIndex(this.s_index); + this.s_index++ + } + show_hp(t:number=2){ + this.hp_cd = t; + this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = true; + + this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").setSiblingIndex(this.s_index); + this.s_index++ + } + show_crit(t:number=2){ + this.crit_cd = t; + this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = true; + this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").setSiblingIndex(this.s_index); + this.s_index++ + } + + hp_show(){ + let hp_progress= this.heroView.hp/this.heroView.rhp_max; + this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress; + if(this.heroView.hp == this.heroView.rhp_max){ + this.node.getChildByName("top").getChildByName("hp").active = false; + } else{ + this.node.getChildByName("top").getChildByName("hp").active = true; + } + } + dead(){ + var path = "game/skills/dead"; + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + let pos = v3(this.node.position.x,this.node.position.y+30,this.node.position.z); + node.parent = this.node; + node.setPosition(pos); + } + in_atked() { + var path = "game/skills/atked"; + var prefab: Prefab = oops.res.get(path, Prefab)!; + var node = instantiate(prefab); + let pos =v3(15,30); + node.setPosition(pos) + node.parent = this.node; + } + + to_speek(words:string,time:number=0.5){ + this.speek_time=0.5 + this.node.getChildByName("tooltip").active=true + this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = words + } + in_speek(dt: number){ + if(this.speek_time <= 0){ + return; + } + this.speek_time -= dt; + if(this.speek_time <= 0){ + this.speek_time = 0; + this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = ""; + this.node.getChildByName("tooltip").active=false; + } + } + tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=90){ + // console.log("tooltip",type); + let tip =ecs.getEntity(Tooltip); + let pos = v3(0,0); + pos.y=pos.y+y; + tip.load(pos,type,value,s_uuid,this.node); + } + heathed(){ + this.node.getChildByName("heathed").active=true } } diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index c9e6e35c..e7ae1a0c 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -22,13 +22,14 @@ import { Tooltip } from "../skills/Tooltip"; import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager"; import { TimerManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/TimerManager"; import { HeroSet } from "../common/config/heroSet"; +import { BuffComp } from "./BuffComp"; const { ccclass, property } = _decorator; /** 角色显示组件 */ @ccclass('HeroViewComp') // 定义为 Cocos Creator 组件 @ecs.register('HeroView', false) // 定义为 ECS 组件 export class HeroViewComp extends CCComp { - + BUFFCOMP:any=null!; enemy_pos:Vec3=null!; enemy:any=null!; @@ -127,7 +128,10 @@ export class HeroViewComp extends CCComp { } /** 视图层逻辑代码分离演示 */ start () { + this.as.idle() + this.BUFFCOMP=this.node.getComponent(BuffComp); + /** 方向 */ this.node.setScale(this.scale,1); this.node.getChildByName("top").setScale(this.scale,1); @@ -218,7 +222,6 @@ export class HeroViewComp extends CCComp { this.at += dt; this.check_enemy_alive() this.in_atk(dt); - this.hp_show() this.move(dt); this.check_mission_buf() } @@ -311,15 +314,6 @@ export class HeroViewComp extends CCComp { this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z); } - hp_show(){ - let hp_progress= this.hp/this.rhp_max; - this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress; - if(this.hp == this.rhp_max){ - this.node.getChildByName("top").getChildByName("hp").active = false; - } else{ - this.node.getChildByName("top").getChildByName("hp").active = true; - } - } skill_pos(){ return v3(0,35) } @@ -360,8 +354,8 @@ export class HeroViewComp extends CCComp { if(skill.is_crit){ l_hp = l_hp * (150+skill.crit_add)/100 } - l_hp=-1*Math.ceil(l_hp) - this.hp_change(l_hp,skill.is_crit); + l_hp=Math.ceil(l_hp) + this.hp_less(l_hp,skill.is_crit); } //能量判断 check_power(){ @@ -389,7 +383,7 @@ export class HeroViewComp extends CCComp { { let i = RandomManager.instance.getRandomInt(0,100,3) if(i < this.crit_max){ - this.tooltip(5,"*会心一击*"); + this.BUFFCOMP.tooltip(5,"*会心一击*"); this.crit_count += 1 this.exp_add(this.cexp) // 暴击经验 this.power_add(this.cpw) @@ -409,7 +403,7 @@ export class HeroViewComp extends CCComp { let i = RandomManager.instance.getRandomInt(0,100,3) if(i < this.dodge_max){ // console.log("闪避触发: i="+i+":dodge="+dodge); - this.tooltip(5,"闪避"); + this.BUFFCOMP.tooltip(5,"闪避"); this.exp_add(this.doexp) // 闪避经验 this.power_add(this.dopw) this.dodge_count += 1 @@ -512,7 +506,7 @@ export class HeroViewComp extends CCComp { handle_skill(skill:number){ this.as.max() this.at = 0; - this.tooltip(3,SkillSet[skill].name,skill); + this.BUFFCOMP.tooltip(3,SkillSet[skill].name,skill); switch (SkillSet[skill].tg) { case 0: //自己 @@ -605,52 +599,30 @@ export class HeroViewComp extends CCComp { } - to_speek(words:string,time:number=0.5){ - this.speek_time=0.5 - this.node.getChildByName("tooltip").active=true - this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = words - } - in_speek(dt: number){ - if(this.speek_time <= 0){ - return; - } - this.speek_time -= dt; - if(this.speek_time <= 0){ - this.speek_time = 0; - this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = ""; - this.node.getChildByName("tooltip").active=false; - } - } - - heathed(){ - this.node.getChildByName("heathed").active=true - } hp_max_add(){ console.log("hp_max_add 动画"); } add_hp(hp: number=0){ - this.heathed(); + this.BUFFCOMP.heathed(); this.hp+=hp; if(this.hp > this.rhp_max){ this.hp = this.rhp_max; } - this.tooltip(2,hp.toFixed(0)); + this.BUFFCOMP.tooltip(2,hp.toFixed(0)); } add_hp_max(hp: number=0){ this.hp_max_add() this.hp += hp/100*this.hp_max; } - hp_change(hp: number,is_crit:boolean=false){ + hp_less(hp: number,is_crit:boolean=false){ if(this.is_dead){ return; } - - this.hp += hp; - + this.hp -= hp; if(is_crit){ - this.tooltip(4,hp.toFixed(0),250); + this.BUFFCOMP.tooltip(4,hp.toFixed(0),250); }else{ - this.tooltip(1,hp.toFixed(0),250); + this.BUFFCOMP.tooltip(1,hp.toFixed(0),250); } if(this.hp > this.rhp_max){ @@ -692,18 +664,7 @@ export class HeroViewComp extends CCComp { add_shield(shield:number){ this.shield =shield console.log("shield:",shield); - if(this.shield > 0){ - this.node.getChildByName("shielded").active=true - } } - tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=90){ - // console.log("tooltip",type); - let tip =ecs.getEntity(Tooltip); - let pos = v3(0,0); - pos.y=pos.y+y; - tip.load(pos,type,value,s_uuid,this.node); - } - /** 静止时间 */ in_stop (dt: number) { if(this.stop_cd > 0){ @@ -716,24 +677,14 @@ export class HeroViewComp extends CCComp { } in_atked() { - var path = "game/skills/atked"; - var prefab: Prefab = oops.res.get(path, Prefab)!; - var node = instantiate(prefab); - let pos =v3(15,30); - node.setPosition(pos) - node.parent = this.node; + this.BUFFCOMP.in_atked() // this.as.atked(); this.atked_count++; this.exp_add(this.uaexp) this.power_add(this.uapw) } dead(){ - var path = "game/skills/dead"; - var prefab: Prefab = oops.res.get(path, Prefab)!; - var node = instantiate(prefab); - let pos = v3(this.node.position.x,this.node.position.y+30,this.node.position.z); - node.parent = this.node; - node.setPosition(pos); + this.BUFFCOMP.dead() this.exp_add(this.dexp) this.power_add(this.dpw) } diff --git a/assets/script/game/skills/TooltipCom.ts b/assets/script/game/skills/TooltipCom.ts index d829760b..27d63841 100644 --- a/assets/script/game/skills/TooltipCom.ts +++ b/assets/script/game/skills/TooltipCom.ts @@ -31,7 +31,7 @@ export class TooltipCom extends CCComp { this.node.getChildByName("loss_life").active=true; tween(this.node).to( this.alive_time, - {position:v3(this.node.position.x-10,this.node.position.y+20), }, + {position:v3(this.node.position.x,this.node.position.y+20), }, { onComplete:()=>{ this.ent.destroy()}, easing:"linear" @@ -69,7 +69,7 @@ export class TooltipCom extends CCComp { this.node.getChildByName("bloss").active=true; tween(this.node).to( this.alive_time, - {position:v3(this.node.position.x-10,this.node.position.y+20), }, + {position:v3(this.node.position.x,this.node.position.y+20), }, { onComplete:()=>{ this.ent.destroy()}, easing:"linear"