25 Commits

Author SHA1 Message Date
c9a499e38b dd 2025-05-30 14:52:06 +08:00
37618b0bd5 dd 2025-05-30 14:35:10 +08:00
d448779c8d dd 2025-05-30 13:43:04 +08:00
96db3dc1bd 金币系统 2025-05-30 10:34:18 +08:00
564b3e2de9 dd 2025-05-29 16:48:14 +08:00
e695b9bdac 游戏流程控制通过节点间 通信完成 2025-05-29 16:45:43 +08:00
8cb3fe192d 战斗开始 延迟刷新卡牌 2025-05-29 10:11:24 +08:00
b7a05c2c24 延迟弹出结束 2025-05-29 09:21:19 +08:00
cb1ac100da 主体 死亡后结束战局 2025-05-29 09:02:38 +08:00
6a185a2361 dd 2025-05-28 16:59:59 +08:00
ba05b59f4d dd 2025-05-27 16:45:22 +08:00
cdb09a5ca1 ff 2025-05-27 10:57:42 +08:00
424edb89a7 dd 2025-05-26 23:20:17 +08:00
3efbf21a14 战斗等级显示需要完善 2025-05-26 16:38:59 +08:00
85856ccc28 dd 2025-05-23 16:23:16 +08:00
2c3f682b18 dd 2025-05-23 10:54:57 +08:00
9b97bff159 dd 2025-05-23 10:25:40 +08:00
da1124a065 dd 2025-05-15 17:00:06 +08:00
30d5cfbb7c 位置已取消 2025-05-15 16:51:52 +08:00
ea64303410 英雄召唤修改为到特定位置 取消类型与位置绑定 2025-05-15 16:27:14 +08:00
176bdbc811 dd 2025-05-14 10:11:51 +08:00
476be36a03 dd 2025-05-13 16:57:39 +08:00
14da4fb2d1 dd 2025-05-06 00:06:20 +08:00
64163a675f dd 2025-04-29 16:44:05 +08:00
999250c160 去掉技能,卡池等级,全场技能 2025-04-29 10:31:26 +08:00
45 changed files with 27568 additions and 2409 deletions

View File

@@ -3,6 +3,9 @@
"__type__": "cc.AnimationClip",
"_name": "notify",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 60,
"speed": 1,
@@ -21,8 +24,13 @@
"__id__": 23
}
],
"_exoticAnimation": null,
"_events": [],
"_exoticAnimation": null
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 34
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
@@ -30,7 +38,8 @@
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
}
},
"proxy": null
},
"_channels": [
{
@@ -64,7 +73,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -77,7 +86,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -88,7 +98,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -99,7 +110,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -115,7 +127,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -123,34 +135,37 @@
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"value": 400,
"rightTangent": 0,
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"value": 400,
"rightTangent": 0,
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 300,
"value": 700,
"rightTangent": 0,
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -166,7 +181,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -179,7 +194,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -190,7 +206,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -201,7 +218,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -226,7 +244,8 @@
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 12
}
},
"proxy": null
},
"_channels": [
{
@@ -273,7 +292,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -286,7 +305,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -297,7 +317,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -308,7 +329,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -324,7 +346,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -337,7 +359,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -348,7 +371,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -359,7 +383,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -375,7 +400,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -388,7 +413,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -399,7 +425,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -410,7 +437,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -426,7 +454,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -439,7 +467,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -450,7 +479,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -461,7 +491,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -473,7 +504,8 @@
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 24
}
},
"proxy": null
},
"_channels": [
{
@@ -513,7 +545,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -526,7 +558,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -537,7 +570,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -548,7 +582,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -564,7 +599,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -577,7 +612,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -588,7 +624,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -599,7 +636,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -615,7 +653,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -628,7 +666,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -639,7 +678,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -650,7 +690,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
@@ -666,7 +707,7 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.8333333333333334,
0.8333333134651184,
1.25
],
"_values": [
@@ -679,7 +720,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -690,7 +732,8 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
@@ -701,10 +744,16 @@
"rightTangentWeight": 0,
"leftTangent": 0,
"leftTangentWeight": 0,
"easingMethod": 0
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "766e69d3-f7bc-4ce2-a413-b3c0d99220ae",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "toast"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "407f71e4-91fa-4800-be94-bcb155cde502",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "MSCard"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "0828a791-6a59-42fe-8703-bcf1b96d8980",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "hart"
}
}

View File

@@ -121,7 +121,7 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.7,
"x": 0.9,
"y": 1,
"z": 1
},
@@ -741,7 +741,7 @@
"__id__": 39
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 45
@@ -752,8 +752,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -21.65,
"y": -12.854,
"x": 0,
"y": -18.226,
"z": 0
},
"_lrot": {
@@ -765,8 +765,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.8,
"y": 0.8,
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
@@ -843,8 +843,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 25,
"height": 25
"width": 35,
"height": 35
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -880,7 +880,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@228f2",
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@008c0",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
@@ -979,8 +979,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 13.123046875,
"height": 27.2
"width": 17.90380859375,
"height": 35.5
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1018,10 +1018,10 @@
"_string": "5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_actualFontSize": 25,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 20,
"_lineHeight": 25,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
@@ -1040,7 +1040,7 @@
"b": 0,
"a": 255
},
"_outlineWidth": 1,
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
@@ -1128,7 +1128,7 @@
"__id__": 49
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 55
@@ -1142,8 +1142,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 3.852,
"y": -16.452,
"x": 0,
"y": -17.782,
"z": 0
},
"_lrot": {
@@ -1192,8 +1192,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -33.829,
"y": 5.074,
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
@@ -1205,8 +1205,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.3,
"y": 0.3,
"x": 0.5,
"y": 0.5,
"z": 1
},
"_mobility": 0,
@@ -1416,7 +1416,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 35,
"y": -140,
"y": -129.839,
"z": 0
},
"_lrot": {
@@ -1806,7 +1806,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": -35,
"y": -140,
"y": -129.839,
"z": 0
},
"_lrot": {

File diff suppressed because it is too large Load Diff

View File

@@ -95,9 +95,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -162,9 +162,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -229,9 +229,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -347,9 +347,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -414,9 +414,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -545,9 +545,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.4444444477558136
0.16666666666666666,
0.2777777777777778,
0.4444444444444444
],
"_values": [
{
@@ -612,9 +612,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.4444444477558136
0.16666666666666666,
0.2777777777777778,
0.4444444444444444
],
"_values": [
{
@@ -678,8 +678,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.1666666716337204,
0.2777777910232544
0.16666666666666666,
0.2777777777777778
],
"_values": [
{
@@ -771,9 +771,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -838,9 +838,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -904,9 +904,9 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.1666666716337204,
0.2777777910232544,
0.6666666865348816
0.16666666666666666,
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -1010,8 +1010,8 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.2777777910232544,
0.5555555820465088
0.2777777777777778,
0.5555555555555556
],
"_values": [
{
@@ -1064,8 +1064,8 @@
"__type__": "cc.RealCurve",
"_times": [
0,
0.2777777910232544,
0.5555555820465088
0.2777777777777778,
0.5555555555555556
],
"_values": [
{
@@ -1117,7 +1117,7 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544
0.2777777777777778
],
"_values": [
{
@@ -1196,8 +1196,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544,
0.6666666865348816
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -1237,8 +1237,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544,
0.6666666865348816
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -1278,8 +1278,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544,
0.6666666865348816
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -1370,8 +1370,9 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.3333333432674408,
0.6666666865348816
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
@@ -1386,6 +1387,18 @@
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
@@ -1411,10 +1424,23 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.3333333432674408,
0.6666666865348816
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": -20,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
@@ -1452,8 +1478,9 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.3333333432674408,
0.6666666865348816
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
@@ -1468,6 +1495,18 @@
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
@@ -1544,8 +1583,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544,
0.6666666865348816
0.2777777777777778,
0.6666666666666666
],
"_values": [
{
@@ -1585,8 +1624,8 @@
{
"__type__": "cc.RealCurve",
"_times": [
0.2777777910232544,
0.6666666865348816
0.2777777777777778,
0.6666666666666666
],
"_values": [
{

View File

@@ -701,8 +701,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 38.30422574344615,
"height": 46.1
"width": 22.745271853397803,
"height": 27.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -740,10 +740,10 @@
"_string": "10",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 35,
"_fontSize": 35,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 35,
"_lineHeight": 20,
"_overflow": 0,
"_enableWrapText": true,
"_font": {

File diff suppressed because it is too large Load Diff

View File

@@ -38,9 +38,22 @@ export class SingletonModuleComp extends ecs.Comp {
mon_front_x:number = 0;
mon_back_x:number = 0;
vmdata: any = {
name : "纸片精灵大乱斗",
game_over:false,
game_pause:false,
mission_data:{
gold:10,//金币
refresh_gold:1,//刷新金币
refrsh_time:1, //刷新时间
call_gold:3,//召唤金币
add_gold:1,//金币增加
change_gold:1,//金币变化
exp:0,//经验
skp:0,//技能点
box:0,//宝箱
energy:0,//能量
hp:0,//血量
ap:0,//攻击
},
mission:{
once:6, //每波刷新怪物数量
total:1, //总怪物数

View File

@@ -12,14 +12,21 @@ export enum GameEvent {
/** 登陆成功 */
LoginSuccess = "LoginSuccess",
MSSelected = "MSSelected",
MissionStart = "MissionStart",
MissionEnd = "MissionEnd",
CastSkill = "CastSkill",
CardRefresh = "CardRefresh",
UseCard = "UseCard",
UserHeroCard = "UserHeroCard",
UserSkillCard = "UserSkillCard",
UseHeroCard = "UseHeroCard",
UseSkillCard = "UseSkillCard",
CallHero = "CallHero",
MissionSkill = "MissionSkill",
MissionLoss = "MissionLoss",
MissionWin = "MissionWin",
MissionStart = "MissionStart",
FightStart = "FightStart",
FightPause = "FightPause",
FightResume = "FightResume",
FightEnd = "FightEnd",
MissionEnd = "MissionEnd",
MissionComplete = "MissionComplete",//战斗结算完成
}

View File

@@ -20,6 +20,8 @@ export enum UIID {
ItemInfo,
/**物品 */
Victory,
// /** 提示窗 */
// Toast,
}
/** 打开界面方式的配置数据 */
@@ -30,4 +32,5 @@ export var UIConfigData: { [key: number]: UIConfig } = {
[UIID.Role_Controller]: { layer: LayerType.UI, prefab: "gui/role_controller" },
[UIID.ItemInfo]: { layer: LayerType.Dialog, prefab: "gui/element/item_info" },
[UIID.Victory]: { layer: LayerType.Dialog, prefab: "gui/element/victory" },
// [UIID.Toast]: { layer: LayerType.PopUp, prefab: "common/prefab/toast" },
}

View File

@@ -11,8 +11,8 @@ export const BossList = {
}
}
export const MissionNum = 3 //对应关卡数MissionSet 的索引
export const MissionSet = [
export const MissionNum = 3 //对应关卡数MissionMons 的索引
export const MissionMons = [
[5201,5202,5203,5204,5205,5206,5210,5211,5212],
[5213,5214,5215],
[5201],
@@ -45,3 +45,24 @@ export const MBSet = {
crit_cost:2,
dodge_cost:2,
}
export const MissStatus = {
ready:0,
playing:1,
pause:2,
choose:3,
end:4,
}
export enum FightSet {
ATK_TO_ATK_RATIO=0.1,
ATK_TO_HP_RATIO=0.2,
ATK_TO_SHIELD_RATIO=2,
ATK_LINES = 3, //英雄数
MON_GOLD_ADD =2,
MON_COIN_ADD=2,
COIN_ADD=1,
DEF_RATE=0.7,
DODGE_MAX=70,
HERO_NUM=3,
AP_UPDATE_RATE=100,
AP_CHANGE_RATE=0,
}

View File

@@ -2,7 +2,7 @@
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "1a81eb9e-feb4-483f-a5c0-ca5f0b358627",
"uuid": "26aee2e6-ab33-4155-a0aa-221c6be8d030",
"files": [],
"subMetas": {},
"userData": {}

View File

@@ -49,41 +49,41 @@ export const MonSet = {
3:{pos:v3(320,10,0)},
}
export const HeroInfo = {
5001:{uuid:5001,name:"神圣守护",path:"k2", lv:3,kind:1,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5002:{uuid:5002,name:"幻影剑豪",path:"k1", lv:3,kind:2,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5003:{uuid:5003,name:"战争领主",path:"k5", lv:3,kind:2,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5004:{uuid:5004,name:"混沌法师",path:"zh1", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:50,skills:[6003],tals:"说明"},
5005:{uuid:5005,name:"火焰法师",path:"zh2", lv:3,kind:2,type:2,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:50,skills:[6003],tals:"说明"},
5006:{uuid:5006,name:"风暴精灵",path:"m4", lv:3,kind:2,type:2,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:50,skills:[6001],tals:"说明"},
5007:{uuid:5007,name:"生命圣者",path:"d1", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:50,skills:[6003],tals:"说明"},
5008:{uuid:5008,name:"战争祭祀",path:"d2", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:50,skills:[6003],tals:"说明"},
5009:{uuid:5009,name:"暴风射手",path:"a5", lv:3,kind:2,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:50,skills:[6006],tals:"说明"},
5010:{uuid:5010,name:"苍穹射手",path:"a3", lv:3,kind:1,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:50,skills:[6006],tals:"说明"},
5011:{uuid:5011,name:"幽灵射手",path:"a4", lv:3,kind:2,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:50,skills:[6006],tals:"说明"},
5201:{uuid:5201,name:"兽人战士",path:"mor1", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5202:{uuid:5202,name:"兽人刺客",path:"mor2", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5203:{uuid:5203,name:"兽人护卫",path:"mor3", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6007],tals:"说明"},
5204:{uuid:5204,name:"石卫", path:"mgem1",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5205:{uuid:5205,name:"土卫", path:"mgem2",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5206:{uuid:5206,name:"树人", path:"mgem3",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5210:{uuid:5210,name:"骷髅战士",path:"mkl4", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5211:{uuid:5211,name:"骷髅战士",path:"mkl5", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5212:{uuid:5212,name:"骷髅战士",path:"mkl6", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5213:{uuid:5213,name:"骷髅射手",path:"mkla1",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6005],tals:"说明"},
5214:{uuid:5214,name:"骷髅射手",path:"mkla2",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6005],tals:"说明"},
5215:{uuid:5215,name:"骷髅射手",path:"mkla3",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6005],tals:"说明"},
5216:{uuid:5216,name:"元素1", path:"my1", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:50,skills:[6001],tals:"说明"},
5217:{uuid:5217,name:"元素2", path:"my2", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:50,skills:[6002],tals:"说明"},
5218:{uuid:5218,name:"元素3", path:"my3", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:50,skills:[6003],tals:"说明"},
5219:{uuid:5219,name:"牛头战士",path:"mn1", lv:2,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5220:{uuid:5220,name:"牛头战士",path:"mn2", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6010],tals:"说明"},
5221:{uuid:5221,name:"牛头战士",path:"mn3", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5222:{uuid:5222,name:"独眼巨人",path:"md1", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6005],tals:"说明"},
5223:{uuid:5223,name:"独眼巨人",path:"md2", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:50,skills:[6008],tals:"说明"},
5224:{uuid:5224,name:"独眼巨人",path:"md3", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:50,skills:[6005],tals:"说明"},
5225:{uuid:5225,name:"精英独眼",path:"md4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:50,skills:[6009],tals:"说明"},
5226:{uuid:5226,name:"精英牛头",path:"mn4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:50,skills:[6010],tals:"说明"},
5227:{uuid:5227,name:"精英兽人",path:"mor4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:50,skills:[6009],tals:"说明"}
5001:{uuid:5001,name:"神圣守护",path:"k2", lv:3,kind:1,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5002:{uuid:5002,name:"幻影剑豪",path:"k1", lv:3,kind:2,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5003:{uuid:5003,name:"战争领主",path:"k5", lv:3,kind:2,type:0,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5004:{uuid:5004,name:"混沌法师",path:"zh1", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:100,skills:[6003],tals:"说明"},
5005:{uuid:5005,name:"火焰法师",path:"zh2", lv:3,kind:2,type:2,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:100,skills:[6003],tals:"说明"},
5006:{uuid:5006,name:"风暴精灵",path:"m4", lv:3,kind:2,type:2,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:100,skills:[6001],tals:"说明"},
5007:{uuid:5007,name:"生命圣者",path:"d1", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:100,skills:[6003],tals:"说明"},
5008:{uuid:5008,name:"战争祭祀",path:"d2", lv:3,kind:2,type:2,hp:5,ap:10,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.5,speed:100,skills:[6003],tals:"说明"},
5009:{uuid:5009,name:"暴风射手",path:"a5", lv:3,kind:2,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:100,skills:[6006],tals:"说明"},
5010:{uuid:5010,name:"苍穹射手",path:"a3", lv:3,kind:1,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:100,skills:[6006],tals:"说明"},
5011:{uuid:5011,name:"幽灵射手",path:"a4", lv:3,kind:2,type:1,hp:5,ap:15,ap_u:0,ap_ur:0,hp_up:0,dis:700,a_cd:1.2,speed:100,skills:[6006],tals:"说明"},
5201:{uuid:5201,name:"兽人战士",path:"mor1", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5202:{uuid:5202,name:"兽人刺客",path:"mor2", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5203:{uuid:5203,name:"兽人护卫",path:"mor3", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6007],tals:"说明"},
5204:{uuid:5204,name:"石卫", path:"mgem1",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5205:{uuid:5205,name:"土卫", path:"mgem2",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5206:{uuid:5206,name:"树人", path:"mgem3",lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5210:{uuid:5210,name:"骷髅战士",path:"mkl4", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5211:{uuid:5211,name:"骷髅战士",path:"mkl5", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5212:{uuid:5212,name:"骷髅战士",path:"mkl6", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5213:{uuid:5213,name:"骷髅射手",path:"mkla1",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6005],tals:"说明"},
5214:{uuid:5214,name:"骷髅射手",path:"mkla2",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6005],tals:"说明"},
5215:{uuid:5215,name:"骷髅射手",path:"mkla3",lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6005],tals:"说明"},
5216:{uuid:5216,name:"元素1", path:"my1", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:100,skills:[6001],tals:"说明"},
5217:{uuid:5217,name:"元素2", path:"my2", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:100,skills:[6002],tals:"说明"},
5218:{uuid:5218,name:"元素3", path:"my3", lv:2,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1.5,speed:100,skills:[6003],tals:"说明"},
5219:{uuid:5219,name:"牛头战士",path:"mn1", lv:2,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5220:{uuid:5220,name:"牛头战士",path:"mn2", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6010],tals:"说明"},
5221:{uuid:5221,name:"牛头战士",path:"mn3", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5222:{uuid:5222,name:"独眼巨人",path:"md1", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6005],tals:"说明"},
5223:{uuid:5223,name:"独眼巨人",path:"md2", lv:1,kind:1,type:0,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1,speed:100,skills:[6008],tals:"说明"},
5224:{uuid:5224,name:"独眼巨人",path:"md3", lv:1,kind:1,type:1,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:80,a_cd:1.2,speed:100,skills:[6005],tals:"说明"},
5225:{uuid:5225,name:"精英独眼",path:"md4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:100,skills:[6009],tals:"说明"},
5226:{uuid:5226,name:"精英牛头",path:"mn4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:100,skills:[6010],tals:"说明"},
5227:{uuid:5227,name:"精英兽人",path:"mor4", lv:3,kind:1,type:2,hp:200,ap:1,ap_u:0,ap_ur:0,hp_up:0,dis:200,a_cd:1,speed:100,skills:[6009],tals:"说明"}
};
export const HeroUpInfo = {
5001:{ap_up:0,ap_up_rate:10,self_ap_up:0,self_ap_up_rate:0,hp_up:0,self_hp_up:0},

View File

@@ -0,0 +1,22 @@
import { _decorator, Component, Node } from 'cc';
import { oops } from 'db://oops-framework/core/Oops';
const { ccclass, property } = _decorator;
@ccclass('stoast')
export class stoast extends Component {
onAdded(args: any) {
console.log("toast打开",args)
}
private close() {
oops.gui.removeByNode(this.node);
}
onDestroy() {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d26fa84f-22b4-4136-bb46-d7e978683365",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,12 @@
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
/**
* 角色属性数据
*/
@ecs.register('BossModel')
export class BossModelComp extends ecs.Comp {
reset() {
}
}

View File

@@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"fa6157bf-a254-44af-a0c0-5d16f12cd761","files":[],"subMetas":{},"userData":{}}

View File

@@ -32,14 +32,24 @@ export class BuffComp extends Component {
wind_cd:number=0;
speek_time:number=0;
start() {
this.info_init()
}
info_init(){
this.top_node = this.node.getChildByName("top");
this.top_node.getChildByName("lv").active=(this.node.getComponent(HeroViewComp).fac == 0 ? true : false)
// this.top_node.getChildByName("hp").active=(this.node.getComponent(HeroViewComp).fac == 1 ? true : false)
this.top_node.getChildByName("sboss").active=this.node.getComponent(HeroViewComp).is_boss
if(this.node.getComponent(HeroViewComp).hero_uuid == 9999){
this.top_node.getChildByName("lv").active=false
}
this.top_node.getChildByName("lv").getChildByName("lv").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).lv.toFixed(0)
this.top_node.getChildByName("ihp").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).hp.toFixed(0)
this.top_node.getChildByName("iap").getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).ap.toFixed(0)
this.top_node.getChildByName("ihp").active=false
this.top_node.getChildByName("iap").active=false
}
update(deltaTime: number) {
@@ -54,11 +64,10 @@ export class BuffComp extends Component {
if(this.buff_cd <= 0 && this.node.getChildByName("buff").active){
this.node.getChildByName("buff").active = false;
}
this.in_speek(deltaTime)
}
hp_show(){
// if(this.node.getComponent(HeroViewComp).fac == 0) return
let hp=this.node.getComponent(HeroViewComp).hp;
let hp_max=this.node.getComponent(HeroViewComp).hp_max;
let hp_progress= hp/hp_max;
@@ -73,8 +82,6 @@ export class BuffComp extends Component {
update_info_hp(){
let ihp_node = this.top_node.getChildByName("ihp");
ihp_node.getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).hp.toFixed(0)
this.hp_show()
}
update_info_ap(){
@@ -82,7 +89,10 @@ export class BuffComp extends Component {
iap_node.getChildByName("num").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).ap.toFixed(0)
}
update_info_lv(){
let lv_node = this.top_node.getChildByName("lv");
lv_node.getChildByName("lv").getComponent(Label)!.string = this.node.getComponent(HeroViewComp).lv.toFixed(0)
}
show_wind(t:number=1){
this.wind_cd = t;

View File

@@ -0,0 +1,15 @@
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { HeroViewComp } from "./HeroViewComp";
/**
* 角色属性数据
*/
@ecs.register('HartModel')
export class HartModelComp extends ecs.Comp {
onLoad(){
console.log("HartModel加载",this)
}
reset() {
}
}

View File

@@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"a32cd4cd-7797-4ef0-bf2d-bd3168fbd0cc","files":[],"subMetas":{},"userData":{}}

View File

@@ -8,6 +8,7 @@ import { BoxSet } from "../common/config/BoxSet";
import { HeroInfo } from "../common/config/heroSet";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { HeroSkillsComp } from "../skill/heroSkillsComp";
import { HartModelComp } from "./HartModelComp";
/** 角色实体 */
@ecs.register(`Hero`)
@@ -27,9 +28,38 @@ export class Hero extends ecs.Entity {
this.remove(HeroViewComp);
super.destroy();
}
hart_load() {
console.log("主体加载")
let box_group=BoxSet.HERO
var path = "game/heros/hart";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
var scene = smc.map.MapView.scene;
node.parent = scene.entityLayer!.node!
let pos=v3(-277,150,0)
node.setPosition(pos)
var hv = node.getComponent(HeroViewComp)!;
hv.scale = 1;
hv.fac = 0;
hv.type = 0;
hv.box_group = box_group;
hv.hero_uuid= 9999;
hv.hero_name= "主体";
hv.speed =hv.ospeed = 0;
hv.dis = 0;
hv.hp= hv.hp_max =5;
hv.ap = 0;
hv.lv=0
hv.cd = 9999
hv.ap_u=0
hv.ap_ur=0
hv.hp_up=0
hv.atk_skill=0
this.add(hv);
this.add(HartModelComp)
}
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,info:any={ap:0,hp:0}) {
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,info:any={ap:0,hp:0},fight_pos:number=0) {
console.log("英雄加载:",uuid,pos,scale,info)
scale = 1
let box_group=BoxSet.HERO
@@ -44,6 +74,7 @@ export class Hero extends ecs.Entity {
let hero= HeroInfo[uuid] // 共用英雄数据
hv.scale = scale;
hv.fac = 0;
hv.fight_pos=fight_pos
hv.type = hero.type;
hv.box_group = box_group;
hv.hero_uuid= uuid;
@@ -52,6 +83,7 @@ export class Hero extends ecs.Entity {
hv.dis = hero.dis;
hv.hp= hv.hp_max =hero.hp+info.hp;
hv.ap = hero.ap+info.ap;
hv.lv=info.lv+1
hv.cd = hero.a_cd
hv.ap_u=hero.ap_u
hv.ap_ur=hero.ap_ur
@@ -61,8 +93,6 @@ export class Hero extends ecs.Entity {
const move = this.get(BattleMoveComp);
move.direction = 1; // 向右移动
move.targetX = 800; // 右边界'
oops.message.dispatchEvent("hero_load",this)
}

View File

@@ -13,9 +13,9 @@ const { ccclass, property } = _decorator;
@ccclass('HeroInfoCompComp')
@ecs.register('HeroInfoComp', false)
export class HeroInfoCompComp extends CCComp {
@property(Number)
@property
c_id:number=0
@property(Boolean)
@property
is_Change:boolean=false
has_hero:boolean=false

View File

@@ -2,7 +2,7 @@ import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,insta
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroSpine } from "./HeroSpine";
import { BoxSet, GameSet } from "../common/config/BoxSet";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { Skill } from "../skills/Skill";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
@@ -12,6 +12,8 @@ import { HeroSet } from "../common/config/heroSet";
import { BuffComp } from "./BuffComp";
import { getMonsterDrops, MonsterType } from "../common/config/RewardSet";
import { HeroSkillsComp } from "../skill/heroSkillsComp";
import { oops } from "db://oops-framework/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator;
@@ -29,6 +31,7 @@ export class HeroViewComp extends CCComp {
hero_uuid:number = 1001;
hero_name : string = "hero";
fight_pos:number=0;
lv:number =1;
slv:number =1;
scale: number = 1; /** 角色阵营 1hero -1 :mon */
@@ -246,17 +249,52 @@ export class HeroViewComp extends CCComp {
}
do_change(){
this.BUFFCOMP.update_info_ap()
this.BUFFCOMP.update_info_hp()
this.BUFFCOMP.update_info_lv()
}
do_update(){
this.BUFFCOMP.update_info_ap()
this.BUFFCOMP.update_info_hp()
this.BUFFCOMP.update_info_lv()
}
do_dead(){
console.log("角色死亡",this.hero_uuid)
if(this.hero_uuid == 9999){
console.log("任务失败")
oops.message.dispatchEvent(GameEvent.FightEnd,this)
}
}
do_atked(remainingDamage:number){
if (this.shield > 0) {
this.shield -= 1
this.BUFFCOMP.tooltip(5,"*吸收*");
remainingDamage = 0
if (this.shield <= 0) {
if(this == null) return;
this.BUFFCOMP.show_shield(false);
}
}else{
if(this == null) return;
this.hp -= remainingDamage;
if(this.hp <= 0) {
if(this == null) return;
this.BUFFCOMP.dead()
this.do_dead()
if(this.ent == null) return;
this.ent.destroy();
}
this.BUFFCOMP.update_info_hp()
this.showDamage(remainingDamage, true);
}
}
dead(){
this.BUFFCOMP.dead()
this.to_drop()
}
//掉落物品
@@ -299,7 +337,10 @@ export class HeroViewComp extends CCComp {
const skills = this.ent.get(HeroSkillsComp);
skills.resetAllCooldowns();
}
to_update(){
this.ap=this.ap*this.lv
}
/** 显示伤害数字 */
showDamage(damage: number, isCrit: boolean) {

View File

@@ -5,11 +5,14 @@ import { GameEvent } from "../common/config/GameEvent";
import { HeroInfo, HeroList } from "../common/config/heroSet";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { oops } from "db://oops-framework/core/Oops";
import { HeroModelComp } from "../hero/HeroModelComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { smc } from "../common/SingletonModuleComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('CardCompp')
@ccclass('CardComp')
@ecs.register('Card', false)
export class CardComp extends CCComp {
c_uuid:number=0;
@@ -17,6 +20,8 @@ export class CardComp extends CCComp {
is_used:boolean=false;
onLoad(){
this.on(GameEvent.CardRefresh,this.onCardRefresh,this)
this.on(GameEvent.MissionStart,this.mission_start,this)
this.on(GameEvent.MissionEnd,this.mission_end,this)
}
start() {
this.init_card()
@@ -25,6 +30,12 @@ export class CardComp extends CCComp {
this.is_used=true
this.node.getChildByName("Button").active=false
this.node.getChildByName("show").active=false
}
mission_start(){
}
mission_end(){
}
onCardRefresh(event: string, args: any){
this.is_used=false
@@ -55,16 +66,34 @@ export class CardComp extends CCComp {
const sprite = show.getChildByName("mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
this.node.getChildByName("Button").getChildByName("Label").getComponent(Label).string=this.check_heros()
}
check_heros(){
// let heros=ecs.query(ecs.allOf(HeroModelComp))
// for(let hero of heros){
// if(hero.get(HeroViewComp).hero_uuid == this.c_uuid){
// return "升级"
// }
// if(hero.get(HeroViewComp).type==HeroInfo[this.c_uuid].type){
// return "替换"
// }
// }
return "召唤"
}
use_card(){
if(this.is_used) return
switch(this.c_type){
case 0:
oops.message.dispatchEvent(GameEvent.UserHeroCard,{uuid:this.c_uuid})
if(smc.vmdata.mission_data.gold< smc.vmdata.mission_data.call_gold){
oops.gui.toast("金币不足", false);
return
}
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid})
smc.vmdata.mission_data.gold-=smc.vmdata.mission_data.call_gold
break
case 1:
oops.message.dispatchEvent(GameEvent.UserSkillCard,{uuid:this.c_uuid})
oops.message.dispatchEvent(GameEvent.UseSkillCard,{uuid:this.c_uuid})
break
case 2:
oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid})

View File

@@ -28,7 +28,7 @@ export class CardControllerComp extends CCComp {
bbg_y:number=40
bbg_x:any=[-300,-150,0,150,300]
protected onLoad(): void {
// oops.message.on(GameEvent.MissionEnd,this.mission_home_to_mission,this)
// this.on(GameEvent.MissionEnd,this.mission_home_to_mission,this)
}
start() {
this.page_init()
@@ -46,6 +46,7 @@ export class CardControllerComp extends CCComp {
}
page_init(){
this.node.getChildByName("mission_home").active=true;
this.node.getChildByName("mission").active=false;
}
mission_home_to_mission(){

View File

@@ -0,0 +1,45 @@
import { instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { MSCardComp } from "./MSCardComp";
import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet";
import { SkillSet } from "../common/config/SkillSet";
/** MSCard 模块 */
@ecs.register(`MSCard`)
export class MSCard extends ecs.Entity {
/** 实始添加的数据层组件 */
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,parent:any,zone:number=0) {
var path = "game/gui/MSCard";
var icon_path = "game/skills/skill_icon"
var prefab: Prefab = oops.res.get(path, Prefab)!;
console.log("load_hcard",prefab)
var node = instantiate(prefab);
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = node.getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
});
node.getChildByName("name").getComponent(Label).string = SkillSet[uuid].name
node.parent = parent
var msc = node.getComponent(MSCardComp)!;
msc.s_uuid= uuid
msc.update_data()
if(zone==1) {msc.is_update=true }else{msc.is_update=false}
if(zone==2) {msc.is_select=true}else{msc.is_select=false}
this.add(msc)
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
super.destroy();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "b808913f-7dc0-4dbf-9e74-12b5338a39ee",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,75 @@
import { _decorator, Label } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp";
import { MissionHomeComp } from "./MissionHomeComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
import { SkillSet } from "../common/config/SkillSet";
import { SChipComp } from "../hero/SChipComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('MSCardComp')
@ecs.register('MSCardComp', false)
export class MSCardComp extends CCComp {
mhc:MissionHomeComp
s_uuid: number = 0;
is_update: boolean = false;
is_select: boolean = false;
is_selected: boolean = false;
/** 视图层逻辑代码分离演示 */
start() {
oops.message.on(GameEvent.MSSelected, this.update_select, this);
this.mhc=this.node.parent.parent.parent.parent.getComponent(MissionHomeComp)
this.change()
}
change_set(){
this.is_update=!this.is_update
this.is_select=!this.is_select
this.change()
}
change(){
if(this.is_update){
this.node.getChildByName("update").active=true
}else{
this.node.getChildByName("update").active=false
}
if(this.is_select){
this.node.getChildByName("set").active=true
this.update_select()
}else{
this.node.getChildByName("set").active=false
}
}
update_data(){
}
select(){
smc.mission.mskill=this.s_uuid
oops.message.dispatchEvent(GameEvent.MSSelected,{uuid:this.s_uuid})
}
update_select(){
console.log("update_select",smc.mission.mskill,this.s_uuid)
if(smc.mission.mskill ==this.s_uuid){
this.node.getChildByName("set").getChildByName("btn").active=false
}else{
this.node.getChildByName("set").getChildByName("btn").active=true
}
}
update_lv(){
let mscards:any= ecs.query(ecs.allOf(MSCardComp));
for(let i=0;i<mscards.length;i++){
mscards[i].MSCardComp.update_data()
}
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "f7a30834-31c8-405a-9f9d-70555981d611",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,115 @@
import { _decorator, Label, ProgressBar, resources, Sprite, SpriteAtlas, v3, Vec3 } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { CdType, SkillSet } from "../common/config/SkillSet";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { Skill } from "../skills/Skill";
import { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('MSkillComp')
@ecs.register('MSkillComp', false)
export class MSkillComp extends CCComp {
/** 技能队列 */
private skillQueue: Array<{
uuid: number,
startPos: Vec3,
targetPos: Vec3,
group: number,
count: number,
cd: number,
cdTimer: number // 改用累计时间计时器
}> = [];
/** 常驻技能 */
MSkill:any={
uuid:0,
CdType:0,
cd:0,
count:0,
cdTimer:0
}
/** 技能队列 */
protected onLoad(): void {
this.on(GameEvent.MissionSkill, this.skill_event, this);
}
start() {
}
init(){
}
protected update(dt: number): void {
if (!smc.mission.play || smc.mission.pause) {
return;
}
// 处理技能队列
this.processSkillQueue(dt);
}
skill_event(e: any) {
// 技能加入队列
const { uuid, startPos, targetPos, group, count = 1, cd = 0 } = e;
this.skillQueue.push({
uuid,
startPos,
targetPos,
group,
count,
cd,
cdTimer: 0 // 初始化计时器为0
});
}
private processSkillQueue(dt: number) {
// 遍历技能队列
for (let i = this.skillQueue.length - 1; i >= 0; i--) {
const skill = this.skillQueue[i];
// 累加计时器
skill.cdTimer += dt;
// 检查CD (将cd从毫秒转换为秒进行比较)
if (skill.cdTimer < skill.cd * 0.001) {
continue;
}
// 释放技能
this.doSkill(
skill.uuid,
skill.startPos,
skill.targetPos,
skill.group
);
// 重置CD计时器
skill.cdTimer = 0;
// 减少技能次数
skill.count--;
// 如果技能次数用完,从队列中移除
if (skill.count <= 0) {
this.skillQueue.splice(i, 1);
}
}
}
private doSkill(uuid: number, start_pos: Vec3, target_pos: Vec3, group: number) {
const skillEntity = ecs.getEntity<Skill>(Skill);
skillEntity.load(
start_pos, // 起始位置
group, // 阵营
this.node.parent, // 父节点
uuid, // 技能ID
target_pos, // 目标位置
);
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
// 清空技能队列
this.skillQueue = [];
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "bce99fa9-0a06-4f7b-b378-77a6aa2524b0",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -3,16 +3,16 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HeroModelComp } from "../hero/HeroModelComp";
import { BoxSet } from "../common/config/BoxSet";
import { MonModelComp } from "../hero/MonModelComp";
import { Missions,} from "../common/config/MissionSet";
import { Missions} from "../common/config/Mission";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { VictoryComp } from "./VictoryComp";
import { CardControllerComp } from "./CardController";
import { GameEvent } from "../common/config/GameEvent";
import { HeroSkillsComp } from "../skill/heroSkillsComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { Hero } from "../hero/Hero";
import { HartModelComp } from "../hero/HartModelComp";
import { TimerManager } from "db://oops-framework/core/common/timer/TimerManager";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@@ -20,92 +20,98 @@ const { ccclass, property } = _decorator;
@ecs.register('Mission', false)
export class MissionComp extends CCComp {
VictoryComp:any = null;
mon_list:any = []
call_hero_timer: Timer = new Timer(0.3);
target_timer: Timer = new Timer(0.1);
reward:number = 0;
reward_num:number = 0;
game_over:boolean = false;
fight_start:boolean = false;
mission_buff_type:number = 1 // 1 攻击 2 防御 3 HP
m_mission_buff_type:number = 1 // 1 攻击 2 防御 3 HP
mission_buff_up_exp:number = 99999999
heros_node:any=null
heros_node_pos:any=v3(0,0,0)
herosc_node:any=null
hero_args:any=null
GlodAddTimer:Timer = new Timer(1);
mission_data:any={
gold:10,//金币
refresh_gold:1,//刷新金币
refrsh_time:1, //刷新时间
call_gold:3,//召唤金币
add_gold:1,//金币增加
change_gold:1,//金币变化
exp:0,//经验
skp:0,//技能点
box:0,//宝箱
energy:0,//能量
hp:0,//血量
ap:0,//攻击
}
onLoad(){
this.on(GameEvent.MissionStart,this.mission_start,this)
this.on(GameEvent.FightEnd,this.fight_end,this)
this.on(GameEvent.MissionEnd,this.mission_end,this)
}
start() {
}
protected update(dt: number): void {
if(!smc.mission.play||smc.mission.pause){
return
}
// if (this.game_timer.update(dt)) {
// smc.vmdata.game.g_time += 1;
// }
if(this.GlodAddTimer.update(dt)){
smc.vmdata.mission_data.gold+=smc.vmdata.mission_data.add_gold
}
}
to_end_fight(){
oops.message.dispatchEvent(GameEvent.FightEnd)
}
call_hero(event: string, args: any){
console.log("call_hero",args)
oops.message.dispatchEvent(GameEvent.CallHero,{uuid:this.hero_args.uuid,pos:args})
this.hero_args=null
}
mission_start(){
/* todo 关卡设定完善*/
console.log("战斗开始 Missions mons:",Missions[smc.mission.lv])
console.log("战斗开始 关卡怪物:",Missions[smc.mission.lv])
this.node.active=true
this.data_init()
this.hero_init()
}
fight_end(){
console.log("任务结束")
// 延迟0.5秒后执行任务结束逻辑
this.scheduleOnce(() => {
smc.mission.play=false
smc.mission.pause=false
this.cleanComponents()
}, 0.5)
}
mission_end(){
this.node.active=false
}
data_init(){
//局内数据初始化
this.GlodAddTimer=new Timer(smc.vmdata.mission_data.refrsh_time)
smc.mission.status=1
this.colose_victory()
this.mission_init()
smc.mission.play = true;
smc.mission.is_victory=false
smc.mission.is_defeat=false
smc.vmdata.mission_data ={...smc.vmdata.mission_data}
}
mission_end(){
oops.message.dispatchEvent(GameEvent.MissionEnd)
smc.mission.play=false
smc.mission.pause=false
this.cleanComponents()
// this.to_mission_home()
this.open_victory()
//角色初始化
hero_init(){
let hero = ecs.getEntity<Hero>(Hero);
hero.hart_load()
this.scheduleOnce(() => {
this.card_init()
}, 0.3)
}
card_init(){
oops.message.dispatchEvent(GameEvent.CardRefresh)
}
card_refresh(){
if(smc.vmdata.mission_data.gold< smc.vmdata.mission_data.refresh_gold){
oops.gui.toast("金币不足", false);
return
}
oops.message.dispatchEvent(GameEvent.CardRefresh)
smc.vmdata.mission_data.gold-=smc.vmdata.mission_data.refresh_gold
}
private cleanComponents() {
ecs.query(ecs.allOf(HeroSkillsComp)).forEach(entity => {entity.remove(HeroSkillsComp);entity.destroy()});
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});
}
open_victory(){
this.node.getChildByName("victory").active=true
this.node.getChildByName("victory").getComponent(VictoryComp).open()
}
colose_victory(){
this.node.getChildByName("victory").active=false
}
to_mission_home(){
this.colose_victory()
let home =this.node.parent.getComponent(CardControllerComp);
home.mission_to_mission_home()
}
mission_init(){
//局内数据初始化
this.fight_start=false
smc.mission.is_victory=false
smc.mission.is_defeat=false
}
card_refresh(){
oops.message.dispatchEvent(GameEvent.CardRefresh)
}
/** 视图层逻辑代码分离演示 */

View File

@@ -1,7 +1,7 @@
import { _decorator, v3, Vec3 } from "cc";
import { _decorator, resources, Sprite, SpriteAtlas, SpriteFrame, v3, Vec3 } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { BoxSet, GameSet } from "../common/config/BoxSet";
import { BoxSet, } from "../common/config/BoxSet";
import { HeroInfo, HeroList, HeroPos, HeroSet, HeroUpInfo } from "../common/config/heroSet";
import { Hero } from "../hero/Hero";
import { smc } from "../common/SingletonModuleComp";
@@ -10,6 +10,9 @@ import { RandomManager } from "db://oops-framework/core/common/random/RandomMana
import { GameEvent } from "../common/config/GameEvent";
import { HeroModelComp } from "../hero/HeroModelComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { oops } from "db://oops-framework/core/Oops";
import { FightSet } from "../common/config/Mission";
import { HartModelComp } from "../hero/HartModelComp";
const { ccclass, property } = _decorator;
@@ -19,15 +22,17 @@ const { ccclass, property } = _decorator;
export class MissionHeroCompComp extends CCComp {
timer:Timer=new Timer(2)
start_pos:any={
0:{pos:v3(-140,135,0),has:false},
1:{pos:v3(-270,205,0),has:false},
2:{pos:v3(-270,65,0),has:false},
0:{pos:v3(-50,135,0),has:false},
1:{pos:v3(-170,205,0),has:false},
2:{pos:v3(-170,65,0),has:false},
}
current_hero_uuid:number=0
onLoad(){
this.on(GameEvent.UserHeroCard,this.call_hero,this)
this.on(GameEvent.UseHeroCard,this.show_heros_pos,this)
}
start() {
// this.test_call()
this.node.getChildByName("location").active=false
}
protected update(dt: number): void {
if(smc.mission.status != 1) return
@@ -41,53 +46,104 @@ export class MissionHeroCompComp extends CCComp {
test_call(){
this.addHero(5010)
}
show_heros_pos(event: string, args: any){
console.log("show_heros_pos",args)
this.current_hero_uuid=args.uuid
this.update_fight_hero_info()
this.node.getChildByName("location").active=true
}
update_fight_hero_info(){
var icon_path = "game/heros/herois"
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos1").getChildByName("hero").active=false
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos2").getChildByName("hero").active=false
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos3").getChildByName("hero").active=false
let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp))
for(let hero of heros){
let hv = hero.get(HeroViewComp)
if(hv.fight_pos==0){
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos1").getChildByName("hero").active=true
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos1").getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[hv.hero_uuid].path);
});
}
if(hv.fight_pos==1){
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos2").getChildByName("hero").active=true
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos2").getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[hv.hero_uuid].path);
});
}
if(hv.fight_pos==2){
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos3").getChildByName("hero").active=true
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos3").getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[hv.hero_uuid].path);
});
}
}
}
call_hero(event: string, args: any){
this.node.getChildByName("location").active=false
console.log("call_hero",args)
let fight_pos=args
this.timer.reset()
let hero_list =HeroList
let x=RandomManager.instance.getRandomInt(0,hero_list.length,1)
let uuid=args.uuid
console.log("call_hero",uuid)
this.addHero(uuid)
// let uuid=args.uuid
// console.log("call_hero",uuid)
this.addHero(this.current_hero_uuid,fight_pos)
}
/** 添加玩家 */
private addHero(uuid:number=1001) {
private addHero(uuid:number=1001,fight_pos:number=0) {
console.log("call_hero addHero",uuid)
let info:any={ap:0,hp:0}
if(this.start_pos[HeroInfo[uuid].type].has){
info=this.get_info_and_remove(HeroInfo[uuid].type,uuid)
}
let info:any=this.get_info_and_remove(fight_pos,uuid)
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1
let pos:Vec3 = this.start_pos[HeroInfo[uuid].type].pos;
let pos:Vec3 = this.start_pos[fight_pos].pos;
console.log("hero load0",pos,this.start_pos)
hero.load(pos,scale,uuid,info);
this.start_pos[HeroInfo[uuid].type].has=true
hero.load(pos,scale,uuid,info,fight_pos);
this.current_hero_uuid=0
}
get_info_and_remove(type:number,uuid:number){
let info:any={ap:0,hp:0}
let heros=ecs.query(ecs.allOf(HeroModelComp))
get_info_and_remove(fight_pos:number,uuid:number){
let info:any={ap:0,hp:0,lv:0}
let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp))
for(let hero of heros){
if(hero.get(HeroViewComp).type==type){
if(hero.get(HeroViewComp).fight_pos==fight_pos){
let hv = hero.get(HeroViewComp)
let AP_UP_RATE = hv.hero_uuid === uuid ? GameSet.AP_UPDATE_RATE : GameSet.AP_CHANGE_RATE;
let heroUpData = HeroUpInfo[hv.hero_uuid] || {}
let o_ap_rate = heroUpData.ap_up_rate || 0 //被替换 升级的英雄额外被替换攻击增长比率
let o_ap = heroUpData.ap_up || 0 //被替换 升级的英雄额外被替换攻击增长值
let s_ap_rate = (HeroUpInfo[uuid] || {}).ap_up_rate || 0 //替换 升级的英雄额外替换攻击增长比率
let s_ap = (HeroUpInfo[uuid] || {}).ap_up || 0 //替换 升级的英雄额外替换攻击增长值
let o_hp_up = heroUpData.hp_up || 0 //被替换 升级的英雄额外被替换血量增长值
let s_hp_up = (HeroUpInfo[uuid] || {}).hp_up || 0 //替换 升级的英雄额外替换血量增长值
info.ap=Math.floor(hv.ap*(AP_UP_RATE+o_ap_rate+s_ap_rate)/100+o_ap+s_ap)
info.hp=Math.floor(o_hp_up+s_hp_up)
// let AP_UP_RATE = hv.hero_uuid === uuid ? FightSet.AP_UPDATE_RATE : FightSet.AP_CHANGE_RATE;
// let heroUpData = HeroUpInfo[hv.hero_uuid] || {}
// let o_ap_rate = heroUpData.ap_up_rate || 0 //被替换 升级的英雄额外被替换攻击增长比率
// let o_ap = heroUpData.ap_up || 0 //被替换 升级的英雄额外被替换攻击增长值
// let s_ap_rate = (HeroUpInfo[uuid] || {}).ap_up_rate || 0 //替换 升级的英雄额外替换攻击增长比率
// let s_ap = (HeroUpInfo[uuid] || {}).ap_up || 0 //替换 升级的英雄额外替换攻击增长值
// let o_hp_up = heroUpData.hp_up || 0 //被替换 升级的英雄额外被替换血量增长值
// let s_hp_up = (HeroUpInfo[uuid] || {}).hp_up || 0 //替换 升级的英雄额外替换血量增长值
// info.ap=Math.floor(hv.ap*(AP_UP_RATE+o_ap_rate+s_ap_rate)/100+o_ap+s_ap)
// info.hp=Math.floor(o_hp_up+s_hp_up)
if(hv.hero_uuid === uuid){
info.ap=hv.ap
info.hp=hv.hp_max
info.lv=hv.lv
}else{
this.do_hero_change()
}
hero.destroy()
return info
}
}
return info
}
do_hero_change(){
//金币加1
smc.vmdata.mission_data.gold+=1
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
// this.node.destroy();

View File

@@ -20,6 +20,7 @@ export class MissionHomeComp extends CCComp {
{uuid:0,px:-300},
]
protected onLoad(): void {
this.on(GameEvent.MissionEnd,this.mission_end,this)
}
/** 视图层逻辑代码分离演示 */
start() {
@@ -28,9 +29,11 @@ export class MissionHomeComp extends CCComp {
this.load_ui_heros()
}
to_start(){
}
start_mission() {
for(let i=0;i<this.heros.length;i++){
this.heros[i].to_destroy()
@@ -42,14 +45,11 @@ export class MissionHomeComp extends CCComp {
{uuid:0,px:-300},
]
oops.message.dispatchEvent(GameEvent.MissionStart, {})
let mission=this.node.parent.getChildByName("mission").getComponent(MissionComp)
mission.node.active = true;
mission.mission_start()
smc.mission.play = true;
this.node.active=false;
}
mission_end(){
this.node.active=true
}
load_ui_heros(){

View File

@@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { Monster } from "../hero/Mon";
import { BoxSet } from "../common/config/BoxSet";
import { HeroSet, MonSet } from "../common/config/heroSet";
import { Missions } from "../common/config/MissionSet";
import { Missions } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { smc } from "../common/SingletonModuleComp";
@@ -18,9 +18,9 @@ export class MissionMonCompComp extends CCComp {
timer:Timer=new Timer(10)
// 添加刷怪队列
private monsterQueue: Array<{uuid: number, position: number, isBoss: boolean}> = [];
private isSpawning: boolean = false;
private isSpawning: boolean = false;// 是否正在生成怪物
private spawnInterval: number = 0.5; // 每个怪物生成间隔时间
private spawnTimer: number = 0;
private spawnTimer: number = 0; // 生成计时器
/** 视图层逻辑代码分离演示 */
start() {

View File

@@ -5,7 +5,7 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
import { smc } from "../common/SingletonModuleComp";
import { HeroViewComp } from "../hero/HeroViewComp";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { MissionReward } from "../common/config/MissionSet";
import { MissionReward } from "../common/config/Mission";
import { Items } from "../common/config/Items";
import { Item } from "./Item";
import { UIID } from "../common/config/GameUIConfig";
@@ -13,6 +13,7 @@ import { PopViewParams, UICallbacks } from "../../../../extensions/oops-plugin-f
import { RewardComp} from "./RewardComp";
import { HChipComp } from "../hero/HChipComp";
import { MissionComp } from "./MissionComp";
import { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator;
@@ -24,29 +25,41 @@ export class VictoryComp extends CCComp {
reward_lv:number=1
reward_num:number=2
/** 视图层逻辑代码分离演示 */
start() {
protected onLoad(): void {
this.on(GameEvent.MissionStart,this.mission_start,this)
this.on(GameEvent.FightEnd,this.mission_complete,this)
}
onAdded(args: any) {
}
mission_start(){
this.hide()
}
mission_complete(){
this.open()
}
victory_end(){
this.hide()
oops.message.dispatchEvent(GameEvent.MissionEnd)
}
open(){
this.show()
}
show(){
this.node.setPosition(v3(0,640,0))
}
hide(){
this.node.setPosition(v3(0,-1000,0))
}
do_x10(){
this.clear_x1()
}
do_x1(){
this.clear_x1()
}
clear_x1(){
this.node.parent.getComponent(MissionComp).to_mission_home()
this.victory_end()
}
item_show(e:any,val:any){
console.log("item_show",val)
}

View File

@@ -20,7 +20,7 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp
private _timers: { [key: string]: number } = {};
private _damageQueue: Array<{ timer: number; callback: () => void }> = [];
init(): void {
oops.message.on(GameEvent.MissionEnd, this.clear_timer, this);
oops.message.on(GameEvent.FightEnd, this.clear_timer, this);
}
filter(): ecs.IMatcher {
return ecs.allOf(HeroViewComp);

View File

@@ -103,25 +103,7 @@ export class SkillCom extends CCComp {
if(oCol.group!=this.group){
if(target == null) return;
let remainingDamage = this.ap;
if (target.shield > 0) {
target.shield -= 1
target.BUFFCOMP.tooltip(5,"*吸收*");
remainingDamage = 0
if (target.shield <= 0) {
if(target == null) return;
target.BUFFCOMP.show_shield(false);
}
}else{
if(target == null) return;
target.hp -= remainingDamage;
if(target.hp <= 0) {
if(target == null) return;
target.BUFFCOMP.dead()
if(target.ent == null) return;
target.ent.destroy();
}
target.showDamage(remainingDamage, true);
}
target.do_atked(remainingDamage)
this.ent.destroy()
}
}