技能开始
This commit is contained in:
@@ -320,10 +320,10 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ahZv91itPcYJm8S0veHYl"
|
||||
"fileId": "bcCcCZuuJMgIWRgtrud9x7"
|
||||
},
|
||||
{
|
||||
"__type__": "89c1c6vLKRJVIjnVC+uIfoU",
|
||||
"__type__": "5ebc6Z5KnFCT7rPSPIJSfvT",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
@@ -338,7 +338,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a7FY/lDn1LTIUSUE2z1JDy"
|
||||
"fileId": "fdtqvT47ZHtpqmElRhXm6a"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
|
||||
475
assets/resources/game/skills/base/xiexia.anim
Normal file
475
assets/resources/game/skills/base/xiexia.anim
Normal file
@@ -0,0 +1,475 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "xiexia",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {
|
||||
"embeddedPlayerGroups": []
|
||||
},
|
||||
"_native": "",
|
||||
"sample": 30,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"enableTrsBlending": false,
|
||||
"_duration": 0.4,
|
||||
"_hash": 500763545,
|
||||
"_tracks": [
|
||||
{
|
||||
"__id__": 1
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_exoticAnimation": null,
|
||||
"_events": [],
|
||||
"_embeddedPlayers": [],
|
||||
"_additiveSettings": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_auxiliaryCurveEntries": []
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.VectorTrack",
|
||||
"_binding": {
|
||||
"__type__": "cc.animation.TrackBinding",
|
||||
"path": {
|
||||
"__id__": 2
|
||||
},
|
||||
"proxy": null
|
||||
},
|
||||
"_channels": [
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_nComponents": 3
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.TrackPath",
|
||||
"_paths": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
"eulerAngles"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.HierarchyPath",
|
||||
"path": "node"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__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,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__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,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 90,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 80,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [],
|
||||
"_values": [],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.VectorTrack",
|
||||
"_binding": {
|
||||
"__type__": "cc.animation.TrackBinding",
|
||||
"path": {
|
||||
"__id__": 13
|
||||
},
|
||||
"proxy": null
|
||||
},
|
||||
"_channels": [
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
}
|
||||
],
|
||||
"_nComponents": 3
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.TrackPath",
|
||||
"_paths": [
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
"position"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.HierarchyPath",
|
||||
"path": "node"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__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,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 16.666666666666664,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 50,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 90,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 60,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.2,
|
||||
0.4
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__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,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": {
|
||||
"tangentMode": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealKeyframeValue",
|
||||
"interpolationMode": 0,
|
||||
"tangentWeightMode": 0,
|
||||
"value": 0,
|
||||
"rightTangent": 0,
|
||||
"rightTangentWeight": 1,
|
||||
"leftTangent": 0,
|
||||
"leftTangentWeight": 1,
|
||||
"easingMethod": 0,
|
||||
"__editorExtras__": null
|
||||
}
|
||||
],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RealCurve",
|
||||
"_times": [],
|
||||
"_values": [],
|
||||
"preExtrapolation": 1,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.AnimationClipAdditiveSettings",
|
||||
"enabled": false,
|
||||
"refClip": null
|
||||
}
|
||||
]
|
||||
13
assets/resources/game/skills/base/xiexia.anim.meta
Normal file
13
assets/resources/game/skills/base/xiexia.anim.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "2.0.3",
|
||||
"importer": "animation-clip",
|
||||
"imported": true,
|
||||
"uuid": "c51459fd-7bf0-42cf-9a36-620f6d6b00b9",
|
||||
"files": [
|
||||
".cconb"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"name": "xiexia"
|
||||
}
|
||||
}
|
||||
479
assets/resources/game/skills/dadao.prefab
Normal file
479
assets/resources/game/skills/dadao.prefab
Normal file
@@ -0,0 +1,479 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "dadao",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "dadao",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 5,
|
||||
"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.Node",
|
||||
"_name": "node",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 30,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0.42261826174069944,
|
||||
"w": 0.9063077870366499
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 50
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "SlashFX",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 2,
|
||||
"y": 2,
|
||||
"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__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 144,
|
||||
"height": 48
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "cbUw6lSltDg6O4tmjWazNk"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "45af5702-7585-4d72-85cf-d7b8da02d832@1615b",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a7s7K5cWFORo80UPsfAaDZ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "dd68TOq2FD/p273TPxVCR5",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 55,
|
||||
"height": 70
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "9dlV3sySpMf6p/E2u6uZ6d"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "db7rmP1d1ILqb1xd5wVWTD",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 600,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "63NP9yq3hEUKD/OZZZ5t7x"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.RigidBody2D",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 15
|
||||
},
|
||||
"enabledContactListener": true,
|
||||
"bullet": true,
|
||||
"awakeOnLoad": true,
|
||||
"_group": 4,
|
||||
"_type": 2,
|
||||
"_allowSleep": false,
|
||||
"_gravityScale": 0,
|
||||
"_linearDamping": 0,
|
||||
"_angularDamping": 0,
|
||||
"_linearVelocity": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_angularVelocity": 0,
|
||||
"_fixedRotation": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f1VxV09PdOkofzgGv1tsZE"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.BoxCollider2D",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"tag": 8,
|
||||
"_group": 4,
|
||||
"_density": 1,
|
||||
"_sensor": true,
|
||||
"_friction": 0.2,
|
||||
"_restitution": 0,
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 600,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "23eik112JPZYGiI8mJalTK"
|
||||
},
|
||||
{
|
||||
"__type__": "45646oIyIdA24W+0c5rdELD",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ahZv91itPcYJm8S0veHYl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "c51459fd-7bf0-42cf-9a36-620f6d6b00b9",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "c51459fd-7bf0-42cf-9a36-620f6d6b00b9",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a5NNgxWupMNKFQIq6nHEwd"
|
||||
},
|
||||
{
|
||||
"__type__": "3a728/XIrpLz7uIWIOQNGox",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1d/L5AuORDL4DvwwET96Ph"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
13
assets/resources/game/skills/dadao.prefab.meta
Normal file
13
assets/resources/game/skills/dadao.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a2b91bdb-2fa7-4cd0-9e6b-cdd7c4c1f04f",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "dadao"
|
||||
}
|
||||
}
|
||||
@@ -24,9 +24,6 @@
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
@@ -35,10 +32,19 @@
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 24
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -71,27 +77,75 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "skill",
|
||||
"_name": "node",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
"__id__": 11
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 30,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0.42261826174069944,
|
||||
"w": 0.9063077870366499
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 50
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "SlashFX",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -128,16 +182,16 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
"__id__": 5
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 48,
|
||||
"height": 60
|
||||
"width": 56,
|
||||
"height": 64
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -148,36 +202,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "43ucwKXvZIjpuRMb6AMdcx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "7a6518aa-87b0-4d48-9460-1ae110cc860f",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "7a6518aa-87b0-4d48-9460-1ae110cc860f",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "71+bR9yIFIpJpY4muGx9bf"
|
||||
"fileId": "cbUw6lSltDg6O4tmjWazNk"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
@@ -185,11 +210,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 8
|
||||
"__id__": 7
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@@ -197,8 +222,8 @@
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 31,
|
||||
"b": 0,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
@@ -207,7 +232,7 @@
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
@@ -222,7 +247,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "c3b7BFrzlCXqVSu960MV5K"
|
||||
"fileId": "a7s7K5cWFORo80UPsfAaDZ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
@@ -232,7 +257,48 @@
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b05wpkPXFJqK6/PzoIxCfr",
|
||||
"fileId": "dd68TOq2FD/p273TPxVCR5",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 55,
|
||||
"height": 70
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "9dlV3sySpMf6p/E2u6uZ6d"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "db7rmP1d1ILqb1xd5wVWTD",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
@@ -247,17 +313,17 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
"__id__": 13
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 40
|
||||
"width": 240,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.49664333316829656,
|
||||
"y": 0.5156666649712457
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@@ -275,7 +341,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
"__id__": 15
|
||||
},
|
||||
"enabledContactListener": true,
|
||||
"bullet": true,
|
||||
@@ -309,7 +375,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 15
|
||||
"__id__": 17
|
||||
},
|
||||
"tag": 8,
|
||||
"_group": 4,
|
||||
@@ -319,13 +385,13 @@
|
||||
"_restitution": 0,
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 1.8,
|
||||
"y": 1
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 52.7,
|
||||
"height": 66.2
|
||||
"width": 240,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@@ -343,7 +409,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
"__id__": 19
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@@ -351,6 +417,53 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ahZv91itPcYJm8S0veHYl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Animation",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "c51459fd-7bf0-42cf-9a36-620f6d6b00b9",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "c51459fd-7bf0-42cf-9a36-620f6d6b00b9",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a5NNgxWupMNKFQIq6nHEwd"
|
||||
},
|
||||
{
|
||||
"__type__": "3a728/XIrpLz7uIWIOQNGox",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1d/L5AuORDL4DvwwET96Ph"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
||||
@@ -13,8 +13,8 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('Main')
|
||||
export class Main extends Root {
|
||||
start() {
|
||||
// if (DEBUG) profiler.showStats();
|
||||
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
if (DEBUG) profiler.showStats();
|
||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
// // | EPhysics2DDrawFlags.Pair
|
||||
// |EPhysics2DDrawFlags.CenterOfMass
|
||||
// |EPhysics2DDrawFlags.Joint
|
||||
|
||||
@@ -87,7 +87,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
9001:{uuid:9001,num:1000,x1:1000},
|
||||
9003:{uuid:9003,num:1000,x1:2000},
|
||||
};
|
||||
fight_heros=[5001]
|
||||
fight_heros=[]
|
||||
mheros:any = [];
|
||||
monsters:any = [];
|
||||
sk_info:any = []
|
||||
|
||||
@@ -28,32 +28,31 @@ run:number = 0; // 0有目标 带方向,1贝塞尔曲线 2 不动 ,3 直线
|
||||
|
||||
*/
|
||||
export const SkillSet={
|
||||
6001:{uuid: 6001,path: "6001",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
|
||||
dis:1,count:1,in:0,run:0,ap:10,hp:0,shield:0,sd:10,cd:3,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6001:{uuid: 6001,path: "6001",type: 1,tg:3,angle:true,upcost:2,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
|
||||
in:0.2,count:1,ap:10,hp:0,shield:0,sd:10,cd:3,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6002:{uuid: 6002,path: "6002",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 3,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人",
|
||||
dis:1,count:1,in:0,run:0,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6002:{uuid: 6002,path: "6002",type: 1,tg:3,angle:true,upcost:2,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人",
|
||||
in:0.2,count:1,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6003:{uuid: 6003,path: "6003",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 3,name: "强效射击",sp_name:"b_arrow",info:"释放一个火球术攻击敌人",
|
||||
dis:1,count:1,in:0,run:1,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6003:{uuid: 6003,path: "6003",type: 1,tg:3,angle:true,upcost:2,name: "强效射击",sp_name:"b_arrow",info:"释放一个火球术攻击敌人",
|
||||
in:0.2,count:1,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6004:{uuid: 6004,path: "6004",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 3,name: "奥术冲击",sp_name:"bm_ball",info:"释放一个寒冰箭攻击敌人",
|
||||
dis:1,count:1,in:0,run:0,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6004:{uuid: 6004,path: "6004",type: 1,tg:3,angle:true,upcost:2,name: "奥术冲击",sp_name:"bm_ball",info:"释放一个寒冰箭攻击敌人",
|
||||
in:0.2,count:1,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6005:{uuid: 6005,path: "6005",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 1,name: "挥砍",sp_name:"patk",info:"蓄力释放剑气攻击敌人",
|
||||
dis:1,count:1,in:0,run:0,ap:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300,},
|
||||
6005:{uuid: 6005,path: "6005",type: 1,tg:3,angle:true,upcost:2,name: "无形剑气",sp_name:"patk",info:"释放无形剑气攻击前方直线100码的敌人",
|
||||
in:0.2,count:1,ap:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300,},
|
||||
6006:{uuid: 6006,path: "6005",type: 1,tg:3,angle:true,upcost:2,name: "有形剑气",sp_name:"dadao",info:"释放有形剑气攻击前方直线300码的敌人",
|
||||
in:0.5,count:1,ap:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300,},
|
||||
|
||||
6006:{uuid: 6006,path: "6003",type: 1,tg:3,angle:true,exp:30,upcost:2,level: 3,name: "强效射击",sp_name:"arrow",info:"释放一个火球术攻击敌人",
|
||||
dis:1,count:1,in:0,run:1,ap:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6101:{uuid: 6101,path: "6101",type: 91,tg:1,angle:false,upcost:2,name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人",
|
||||
in:0.2,count:1,ap:0,hp:3,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6101:{uuid: 6101,path: "6101",type: 91,tg:1,angle:false,exp:30,upcost:2,level: 1,name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人",
|
||||
dis:1,count:1,in:0,run:1,ap:0,hp:3,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6102:{uuid: 6102,path: "6102",type: 91,tg:0,angle:false,upcost:2,name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人",
|
||||
in:0.2,count:1,ap:0,hp:0,shield:1,sd:0,cd:0,bsd:8,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6102:{uuid: 6102,path: "6102",type: 91,tg:0,angle:false,exp:30,upcost:2,level: 1,name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人",
|
||||
dis:1,count:1,in:0.2,run:2,ap:0,hp:0,shield:1,sd:0,cd:0,bsd:8,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
6103:{uuid: 6103,path: "6103",type: 91,tg:0,angle:false,exp:30,upcost:2,level: 1,name: "狂暴",sp_name:"atkup",info:"释放一个寒冰箭攻击敌人",
|
||||
dis:1,count:1,in:0.2,run:2,ap:1,hp:0,shield:0,sd:0,cd:0,bsd:8,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
6103:{uuid: 6103,path: "6103",type: 91,tg:0,angle:false,upcost:2,name: "狂暴",sp_name:"atkup",info:"释放一个寒冰箭攻击敌人",
|
||||
in:0.2,count:1,ap:1,hp:0,shield:0,sd:0,cd:0,bsd:8,bcd:0,sk_uuid:6001,sk_count:0,speed:300, },
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export const HeroInfo = {
|
||||
//坦克, 高防 ,攻击时有可能冲击目标,造成70% 攻击伤害
|
||||
5001: {
|
||||
uuid:5001,name: "灰烬使者",path:"k1",quality:3,kind:1,type:0,hp:200,hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
|
||||
lvexp:100,slvexp:10,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
||||
lvexp:100,slvexp:10,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6006,6006,6006,6006,6006,6006],sk3:[6006,6006,6006,6006,6006,6006],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
||||
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
|
||||
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
|
||||
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
||||
|
||||
@@ -185,13 +185,13 @@ export class HeroViewComp extends CCComp {
|
||||
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
|
||||
|
||||
if(selfCollider.group==BoxSet.HERO){
|
||||
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 50 ){
|
||||
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 40 ){
|
||||
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
|
||||
this.stop_cd = 0.1;
|
||||
}
|
||||
}
|
||||
if(selfCollider.group==BoxSet.MONSTER){
|
||||
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 50 ){
|
||||
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 40 ){
|
||||
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
|
||||
this.stop_cd = 0.1;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,10 @@ export class MissionHomeComp extends CCComp {
|
||||
}
|
||||
start_mission() {
|
||||
console.log("mission_home : start_mission")
|
||||
if (this.heros.length <=0 ) {
|
||||
oops.gui.toast("请先选择英雄")
|
||||
return
|
||||
}
|
||||
for(let i=0;i<this.heros.length;i++){
|
||||
this.heros[i].to_destroy()
|
||||
}
|
||||
|
||||
49
assets/script/game/skills/BezCom.ts
Normal file
49
assets/script/game/skills/BezCom.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('BezCom')
|
||||
export class BezCom extends Component {
|
||||
start() {
|
||||
let base =this.node.getComponent(SkillCom)
|
||||
if(this.node.parent.scale.x < 0){
|
||||
base.t_pos.x=base.t_pos.x*-1
|
||||
}
|
||||
let s_pos = v3(this.node.position.x,this.node.position.y)
|
||||
let c_pos = v3((base.t_pos.x+this.node.position.x)/2,this.node.position.y+100)
|
||||
let e_pos = v3(this.node.position.x+base.t_pos.x,this.node.position.y+base.t_pos.y)
|
||||
let time =Math.abs(base.t_pos.x/base.speed)
|
||||
BezCom.bezierTo(this.node,time,s_pos,c_pos,e_pos,{
|
||||
onComplete: (target?: object) => {
|
||||
base.is_destroy=true
|
||||
},
|
||||
}).start();
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
|
||||
public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) {
|
||||
opts = opts || Object.create(null);
|
||||
/*
|
||||
* @desc 二阶贝塞尔
|
||||
* @param {number} t 当前百分比
|
||||
* @param {} p1 起点坐标
|
||||
* @param {} cp 控制点
|
||||
* @param {} p2 终点坐标
|
||||
* @returns {any}
|
||||
*/
|
||||
let twoBezier = (t:number, p1: Vec3, cp: Vec3, p2: Vec3) => {
|
||||
let x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
|
||||
let y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
|
||||
return v3(x, y, 0);
|
||||
};
|
||||
opts.onUpdate = (arg: Vec3, ratio: number) => {
|
||||
target.position = twoBezier(ratio, c1, c2, to);
|
||||
};
|
||||
return tween(target).to(duration, {}, opts);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/BezCom.ts.meta
Normal file
9
assets/script/game/skills/BezCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "5ebc6679-2a71-424f-bacf-48f20949fbd3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
33
assets/script/game/skills/LineCom.ts
Normal file
33
assets/script/game/skills/LineCom.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('LineCom')
|
||||
export class LineCom extends Component {
|
||||
start() {
|
||||
let base =this.node.getComponent(SkillCom)
|
||||
let time = 720 / base.speed;
|
||||
let squaredDistance = base.t_pos.x * base.t_pos.x + base.t_pos.y * base.t_pos.y;
|
||||
let distance = Math.sqrt(squaredDistance);
|
||||
time = distance / base.speed;
|
||||
let e_pos=v3(this.node.position.x+base.t_pos.x,this.node.position.y+base.t_pos.y)
|
||||
// console.log("skill tx:"+e_pos.x+" node :"+this.node.position.x)
|
||||
this.node.getChildByName("skill").setRotationFromEuler(0,0,base.angle)
|
||||
// console.log("skill ",this.node.getRotation())
|
||||
tween(this.node).to( time,{ position: e_pos},
|
||||
{
|
||||
easing: "linear",
|
||||
onUpdate: (target: Vec3, ratio: number) => { },
|
||||
onComplete: (target?: object) => {
|
||||
base.is_destroy=true
|
||||
},
|
||||
}
|
||||
).start();
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/LineCom.ts.meta
Normal file
9
assets/script/game/skills/LineCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "2050354e-73b6-40f3-8b1b-a7c1bbda9c59",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
24
assets/script/game/skills/NoRunCom.ts
Normal file
24
assets/script/game/skills/NoRunCom.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { _decorator, Component, Node, tween, Vec3 } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('NoRunCom')
|
||||
export class NoRunCom extends Component {
|
||||
start() {
|
||||
let base =this.node.getComponent(SkillCom)
|
||||
tween(this.node).to( base.in_time,
|
||||
{ position: new Vec3(this.node.position.x,this.node.position.y) },
|
||||
{
|
||||
onComplete: (target?: object) => {
|
||||
base.is_destroy=true
|
||||
},
|
||||
}
|
||||
).start();
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/skills/NoRunCom.ts.meta
Normal file
9
assets/script/game/skills/NoRunCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3a728fd7-22ba-4bcf-bb88-588390346a31",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ export class Skill extends ecs.Entity {
|
||||
var node = instantiate(prefab);
|
||||
pos=v3(pos.x,pos.y)
|
||||
node.parent = parent;
|
||||
//转换pos为世界坐标
|
||||
node.setPosition(pos)
|
||||
var sv = node.getComponent(SkillCom)!;
|
||||
let angle=0
|
||||
@@ -47,16 +46,8 @@ export class Skill extends ecs.Entity {
|
||||
sv.is_crit=is_crit
|
||||
sv.crit_add=crit_add
|
||||
// node.setScale(v3(node.scale.x*scale,node.scale.y))
|
||||
|
||||
sv.speed=SkillSet[uuid].speed;
|
||||
sv.dis=SkillSet[uuid].dis;
|
||||
sv.run_type=SkillSet[uuid].run;
|
||||
if(sv.dis == 0){
|
||||
sv.run_type=2
|
||||
}
|
||||
|
||||
sv.in_time=SkillSet[uuid].in;
|
||||
|
||||
sv.t_pos = t_pos; // 目标增量
|
||||
sv.type = SkillSet[uuid].type;
|
||||
sv.box_tag= BoxSet.SKILL_TAG;
|
||||
|
||||
@@ -12,16 +12,8 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('SkillCom')
|
||||
@ecs.register('SkillView', false)
|
||||
export class SkillCom extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
// start() {
|
||||
// // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// // this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
// }
|
||||
s_uuid:number = 0;
|
||||
speed:number = 200;
|
||||
y_speed:number = 0;
|
||||
x_speed:number = 0;
|
||||
dis:number = 80;
|
||||
scale:number = 1;
|
||||
ap:number = 10;
|
||||
atk_count:number = 0;
|
||||
@@ -33,21 +25,11 @@ export class SkillCom extends CCComp {
|
||||
box_group:number = 0;
|
||||
box_tag:number=0;
|
||||
type:number = 1;
|
||||
time:Timer = new Timer(0.01);
|
||||
run_type:number = 0; // 0有目标 带方向,1贝塞尔曲线 2 不动 ,3 直线
|
||||
in_time:number = 0.3; // 不动技能持续时间
|
||||
start() {
|
||||
console.log("skill start run_type:",this.run_type)
|
||||
if(this.node.parent.scale.x < 0){
|
||||
this.t_pos.x=this.t_pos.x*-1
|
||||
}
|
||||
this.x_speed=Math.cos(this.angle * Math.PI / 180) * this.speed-30*this.scale;
|
||||
this.y_speed=Math.sin(this.angle * Math.PI / 180) * this.speed;
|
||||
this.node.active=true
|
||||
|
||||
let collider = this.getComponent(Collider2D);
|
||||
collider.group = this.box_group;
|
||||
|
||||
collider.tag = this.box_tag;
|
||||
collider.sensor = true;
|
||||
if (collider) {
|
||||
@@ -56,125 +38,33 @@ export class SkillCom extends CCComp {
|
||||
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
}
|
||||
|
||||
if(this.run_type == 3){ //直线,默认直线
|
||||
let tx=this.node.position.x+this.dis
|
||||
// console.log("skill tx:"+tx+" node :"+this.node.position.x)
|
||||
let e_pos=v3(tx,this.node.position.y)
|
||||
tween(this.node).to( 0.2,{ position: e_pos},
|
||||
{onComplete: (target?: object) => { this.is_destroy=true },}
|
||||
).start();
|
||||
}
|
||||
if(this.run_type == 0){ //直线,默认直线,有特定目标 朝向目标直线
|
||||
|
||||
let time = 720 / this.speed;
|
||||
let squaredDistance = this.t_pos.x * this.t_pos.x + this.t_pos.y * this.t_pos.y;
|
||||
let distance = Math.sqrt(squaredDistance);
|
||||
time = distance / this.speed;
|
||||
let e_pos=v3(this.node.position.x+this.t_pos.x,this.node.position.y+this.t_pos.y)
|
||||
// console.log("skill tx:"+e_pos.x+" node :"+this.node.position.x)
|
||||
this.node.getChildByName("skill").setRotationFromEuler(0,0,this.angle)
|
||||
// console.log("skill ",this.node.getRotation())
|
||||
tween(this.node).to( time,{ position: e_pos},
|
||||
{
|
||||
easing: "linear",
|
||||
onUpdate: (target: Vec3, ratio: number) => { },
|
||||
onComplete: (target?: object) => {
|
||||
this.is_destroy=true
|
||||
},
|
||||
}
|
||||
).start();
|
||||
}
|
||||
// console.log("skill run_type",this.run_type)
|
||||
if(this.run_type == 1){ //贝塞尔曲线
|
||||
// console.log("skill bezierTo",this.t_pos)
|
||||
let s_pos = v3(this.node.position.x,this.node.position.y)
|
||||
let c_pos = v3((this.t_pos.x+this.node.position.x)/2,this.node.position.y+100)
|
||||
let e_pos = v3(this.node.position.x+this.t_pos.x,this.node.position.y+this.t_pos.y)
|
||||
let time =Math.abs(this.t_pos.x/this.speed)
|
||||
SkillCom.bezierTo(this.node,time,s_pos,c_pos,e_pos,{
|
||||
onComplete: (target?: object) => {
|
||||
this.is_destroy=true
|
||||
},
|
||||
}).start();
|
||||
}
|
||||
|
||||
if(this.run_type == 2){ //原地不动的
|
||||
tween(this.node).to( this.in_time,
|
||||
{ position: new Vec3(this.node.position.x,this.node.position.y) },
|
||||
{
|
||||
onComplete: (target?: object) => {
|
||||
this.is_destroy=true
|
||||
},
|
||||
}
|
||||
).start();
|
||||
}
|
||||
|
||||
}
|
||||
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
if(otherCollider.group != selfCollider.group&&otherCollider.tag ==0){
|
||||
this.atk_count+=1
|
||||
// console.log("skill onBeginContact",selfCollider.group,otherCollider.group)
|
||||
if(this.type==1 ){
|
||||
this.is_destroy=true
|
||||
}
|
||||
// if(this.type==1 ){
|
||||
// this.is_destroy=true
|
||||
// }
|
||||
}
|
||||
}
|
||||
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
this.toDestroy()
|
||||
|
||||
}
|
||||
|
||||
t_move(dt: number){
|
||||
if( this.run_type!=0){
|
||||
return
|
||||
}
|
||||
this.node.setPosition(v3(this.node.position.x+this.x_speed*dt*this.scale,this.node.position.y+this.y_speed*dt))
|
||||
}
|
||||
line_move(dt: number) {
|
||||
if( this.run_type!=0 && this.t_pos){
|
||||
return
|
||||
}
|
||||
this.node.setPosition(v3(this.node.position.x+dt*this.speed*this.scale,this.node.position.y))
|
||||
}
|
||||
bezier(t:number){
|
||||
|
||||
}
|
||||
|
||||
|
||||
toDestroy() {
|
||||
if(this.is_destroy){
|
||||
this.ent.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.is_destroy=false
|
||||
this.node.destroy();
|
||||
}
|
||||
public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) {
|
||||
opts = opts || Object.create(null);
|
||||
/*
|
||||
* @desc 二阶贝塞尔
|
||||
* @param {number} t 当前百分比
|
||||
* @param {} p1 起点坐标
|
||||
* @param {} cp 控制点
|
||||
* @param {} p2 终点坐标
|
||||
* @returns {any}
|
||||
*/
|
||||
let twoBezier = (t:number, p1: Vec3, cp: Vec3, p2: Vec3) => {
|
||||
let x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
|
||||
let y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
|
||||
return v3(x, y, 0);
|
||||
};
|
||||
opts.onUpdate = (arg: Vec3, ratio: number) => {
|
||||
target.position = twoBezier(ratio, c1, c2, to);
|
||||
};
|
||||
return tween(target).to(duration, {}, opts);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,20 +26,24 @@ export class baseCom extends Component {
|
||||
in_time:number = 0.3; // 不动技能持续时间
|
||||
start() {
|
||||
console.log("baseCom start")
|
||||
// let collider = this.getComponent(Collider2D);
|
||||
// collider.group = this.box_group;
|
||||
|
||||
// collider.tag = this.box_tag;
|
||||
// collider.sensor = true;
|
||||
// if (collider) {
|
||||
// collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
// // collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||
// collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
// }
|
||||
let collider = this.getComponent(Collider2D);
|
||||
collider.group = this.box_group;
|
||||
collider.tag = this.box_tag;
|
||||
collider.sensor = true;
|
||||
if (collider) {
|
||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||
// collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
|
||||
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
|
||||
}
|
||||
}
|
||||
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D) {
|
||||
|
||||
|
||||
if(otherCollider.group != selfCollider.group&&otherCollider.tag ==0){
|
||||
this.atk_count+=1
|
||||
// console.log("skill onBeginContact",selfCollider.group,otherCollider.group)
|
||||
if(this.type==1 ){
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
}
|
||||
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user