Compare commits
2 Commits
b6b2dff986
...
030a5cc096
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
030a5cc096 | ||
|
|
747b6d17cf |
@@ -1,140 +0,0 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "atkc3",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {
|
||||
"embeddedPlayerGroups": []
|
||||
},
|
||||
"_native": "",
|
||||
"sample": 25,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"enableTrsBlending": false,
|
||||
"_duration": 0.48,
|
||||
"_hash": 500763545,
|
||||
"_tracks": [
|
||||
{
|
||||
"__id__": 1
|
||||
}
|
||||
],
|
||||
"_exoticAnimation": null,
|
||||
"_events": [],
|
||||
"_embeddedPlayers": [],
|
||||
"_additiveSettings": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_auxiliaryCurveEntries": []
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ObjectTrack",
|
||||
"_binding": {
|
||||
"__type__": "cc.animation.TrackBinding",
|
||||
"path": {
|
||||
"__id__": 2
|
||||
},
|
||||
"proxy": null
|
||||
},
|
||||
"_channel": {
|
||||
"__id__": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.TrackPath",
|
||||
"_paths": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
"spriteFrame"
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.HierarchyPath",
|
||||
"path": "Node"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.ComponentPath",
|
||||
"component": "cc.Sprite"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.animation.Channel",
|
||||
"_curve": {
|
||||
"__id__": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ObjectCurve",
|
||||
"_times": [
|
||||
0,
|
||||
0.04,
|
||||
0.08,
|
||||
0.12,
|
||||
0.16,
|
||||
0.2,
|
||||
0.24,
|
||||
0.28,
|
||||
0.32,
|
||||
0.36,
|
||||
0.4,
|
||||
0.44
|
||||
],
|
||||
"_values": [
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@3e8ba",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@6f653",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@58bf8",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@c0d46",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@87cb2",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@1d17e",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@39134",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@2a4c6",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@eabee",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@5824c",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@d8a54",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
{
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@a8c45",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"__type__": "cc.AnimationClipAdditiveSettings",
|
||||
"enabled": false,
|
||||
"refClip": null
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.3",
|
||||
"importer": "animation-clip",
|
||||
"imported": true,
|
||||
"uuid": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"files": [
|
||||
".cconb"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"name": "atkc3"
|
||||
}
|
||||
}
|
||||
@@ -108,8 +108,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": 1,
|
||||
"x": -0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": 1,
|
||||
"x": -0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 7.98,
|
||||
"x": 6.77,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -108,8 +108,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": 1,
|
||||
"x": -0.7,
|
||||
"y": 0.7,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 91,
|
||||
"width": 122,
|
||||
"height": 68
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -167,13 +167,13 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"r": 61,
|
||||
"g": 255,
|
||||
"b": 20,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@3e8ba",
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@d8028",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
@@ -187,7 +187,7 @@
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
@@ -254,12 +254,12 @@
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "74b8d438-4a5f-44bb-a9a4-fab0b839d49b",
|
||||
"uuid": "f001c311-be1c-4cbf-ac65-61c41cfdd166",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 7.98,
|
||||
"x": 6.77,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -108,8 +108,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": 1,
|
||||
"x": -0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 91,
|
||||
"width": 122,
|
||||
"height": 68
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -167,13 +167,13 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"r": 245,
|
||||
"g": 255,
|
||||
"b": 8,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@3e8ba",
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@d8028",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
@@ -187,7 +187,7 @@
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": {
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026",
|
||||
"__expectedType__": "cc.SpriteAtlas"
|
||||
@@ -254,12 +254,12 @@
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "1f0633af-d218-4dc6-bc80-2f77af909e64",
|
||||
"uuid": "7685f842-288f-47d2-82dd-fb92eb82965b",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 7.98,
|
||||
"x": 6.77,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -108,8 +108,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -1,
|
||||
"y": 1,
|
||||
"x": -0.8,
|
||||
"y": 0.8,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 91,
|
||||
"width": 122,
|
||||
"height": 68
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@@ -167,13 +167,13 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"r": 250,
|
||||
"g": 40,
|
||||
"b": 40,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@3e8ba",
|
||||
"__uuid__": "36b5c30d-a1d9-4bd5-b45e-63b26995d026@d8028",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
@@ -254,12 +254,12 @@
|
||||
"playOnLoad": true,
|
||||
"_clips": [
|
||||
{
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
}
|
||||
],
|
||||
"_defaultClip": {
|
||||
"__uuid__": "4575a281-3d4f-49ec-9152-86d59c8ee8ad",
|
||||
"__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7",
|
||||
"__expectedType__": "cc.AnimationClip"
|
||||
},
|
||||
"_id": ""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "b7ad767f-ed28-48ac-b352-4d6c34184b34",
|
||||
"uuid": "d917ca59-8421-4593-9a55-0c59e08ae8fb",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
|
||||
@@ -18,6 +18,7 @@ export enum TGroup {
|
||||
export enum DTType {
|
||||
single = 0,
|
||||
range = 1,
|
||||
aoe_grid = 2, // 3*3 网格范围攻击,以中路第2、3列为目标
|
||||
}
|
||||
|
||||
export enum SkillKind {
|
||||
@@ -208,7 +209,7 @@ export const SkillSet: Record<number, SkillConfig> = {
|
||||
* 6010 箭矢黄 击晕取向
|
||||
**/
|
||||
6001: {
|
||||
uuid: 6001, name: "普通攻击", sp_name: "atk_c5", icon: "1026", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
|
||||
uuid: 6001, name: "普通攻击", sp_name: "atk_c2", icon: "1026", TGroup: TGroup.Enemy, readyAnm: "", endAnm: "", act: "atk",
|
||||
DTType: DTType.single, ap: 100, hit_count: 1, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.Melee,
|
||||
RType: RType.linear, EType: EType.collision, info: "造成攻击力100%的伤害",
|
||||
},
|
||||
@@ -294,36 +295,36 @@ export const SkillSet: Record<number, SkillConfig> = {
|
||||
**/
|
||||
6201: {
|
||||
uuid: 6201, name: "雷墙", sp_name: "box_1", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
|
||||
},
|
||||
6202: {
|
||||
uuid: 6202, name: "火墙", sp_name: "box_2", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
|
||||
},
|
||||
|
||||
6203: {
|
||||
uuid: 6203, name: "飓风", sp_name: "box_3", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
|
||||
},
|
||||
|
||||
6204: {
|
||||
uuid: 6204, name: "水墙", sp_name: "box_4", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤雷墙阻挡敌人,有概率击晕",
|
||||
},
|
||||
|
||||
6205: {
|
||||
uuid: 6205, name: "风墙", sp_name: "box_5", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤风墙困住敌人,有概率击晕",
|
||||
},
|
||||
|
||||
6206: {
|
||||
uuid: 6206, name: "陨石术", sp_name: "box_6", icon: "1173", TGroup: TGroup.Enemy, readyAnm: "blues", endAnm: "", act: "max",
|
||||
DTType: DTType.range, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
DTType: DTType.aoe_grid, stun: 0, ap: 150, hit_count: 6, hitcd: 0.2, speed: 720, with: 0, ready: 0.2, EAnm: 0, DAnm: "", IType: IType.remote,
|
||||
RType: RType.fixed, EType: EType.animationEnd, info: "召唤陨石范围攻击敌人,有概率击晕",
|
||||
},
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ import { GameEvent } from "../common/config/GameEvent";
|
||||
import { SkillTriggerType } from "../common/config/heroSet";
|
||||
import { SkillTriggerHelper } from "./SkillTriggerHelper";
|
||||
import { MissionEconomy } from "../map/MissionEconomy";
|
||||
import { MissionMonCompComp } from "../map/MissionMonComp";
|
||||
import { MissionHeroComp } from "../map/MissionHeroComp";
|
||||
|
||||
/**
|
||||
* ==================== 自动施法系统 ====================
|
||||
@@ -686,9 +688,41 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
/**
|
||||
* 解析对敌技能目标点:
|
||||
* - 非范围技能:按施法方向生成目标点
|
||||
* - 范围技能:优先前排敌人位置
|
||||
* - range 范围技能:优先前排敌人位置
|
||||
* - aoe_grid 范围技能:以中路第2或第3列为目标(若存在敌人优先第2列,否则第3列;这里简化为直接返回第2列中路的固定坐标,或者根据情况处理)
|
||||
*/
|
||||
private resolveEnemyCastTargetPos(config: SkillConfig, heroAttrs: HeroAttrsComp, heroView: HeroViewComp, nearestEnemy: HeroViewComp, maxRange: number): Vec3 | null {
|
||||
if (config.DTType === DTType.aoe_grid) {
|
||||
const isHero = heroAttrs.fac === FacSet.HERO;
|
||||
if (isHero) {
|
||||
// 英雄打怪物,目标为怪物网格的第2列(idx 1)中路(row 1)或第3列(idx 2)中路
|
||||
// MissionMonComp.MON_POSITIONS 顺序:
|
||||
// 列1: 0,1,2 (X=60)
|
||||
// 列2: 3,4,5 (X=140) -> 第2列中路是 index 4
|
||||
// 列3: 6,7,8 (X=220) -> 第3列中路是 index 7
|
||||
// 简单起见,可以固定取第2列中路(index 4)或第3列中路(index 7)
|
||||
// 若最近的敌人在更后排,也可以取那个敌人的列。
|
||||
// 需求:三类 需要以中路 第 2、 3列为目标。
|
||||
// 我们直接返回第2列中路坐标(X=140, Y=GAME_LINE)或者根据最近敌人判断。
|
||||
// 需求说明为第 2 或 第 3 列,这里我们可以根据目标位置,如果目标在第3列及以后,打第3列,否则打第2列。
|
||||
let targetCol = 1; // 0-based, so 1 is 2nd col
|
||||
if (nearestEnemy && nearestEnemy.node) {
|
||||
// 判断目标所在的列
|
||||
const ex = nearestEnemy.node.position.x;
|
||||
// X=60(列1), X=140(列2), X=220(列3), X=300(列4)
|
||||
if (ex >= 200) targetCol = 2; // 第3列
|
||||
}
|
||||
const targetIdx = targetCol * 3 + 1; // 1是中路
|
||||
return MissionMonCompComp.MON_POSITIONS[targetIdx].clone();
|
||||
} else {
|
||||
// 怪物打英雄,英雄网格:
|
||||
// 列1: 0,1,2 (X=-210)
|
||||
// 列2: 3,4,5 (X=-300)
|
||||
// 英雄只有2列,第2列中路是 index 4
|
||||
return MissionHeroComp.HERO_POSITIONS[4].clone();
|
||||
}
|
||||
}
|
||||
|
||||
if (config.RType === RType.bezier) {
|
||||
return nearestEnemy.node?.position.clone() ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user