From bf5767c188f5762e8861b7ea88b7cc01de2bd917 Mon Sep 17 00:00:00 2001
From: liutao <821580467@qq.com>
Date: Mon, 31 Mar 2025 14:05:28 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BD=BD=E5=85=B7=E6=8A=80=E8=83=BD?=
=?UTF-8?q?=E3=80=91=E5=A2=9E=E5=8A=A0=E5=AD=90=E5=BC=B9=E7=B1=BB=E5=9E=8B?=
=?UTF-8?q?=20lock=5Funit=5Fboom=20=E8=B7=9F=E8=B8=AA=E5=8D=95=E4=BD=8D?=
=?UTF-8?q?=E5=B9=B6=E4=B8=94=E7=88=86=E7=82=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Scripts/Gameplay/Bullet/BulletManager.cs | 2 ++
.../Gameplay/Bullet/Data/EBulletType.cs | 5 ++--
.../Bullet/State/BulletStateUnitLockFly.cs | 25 +++++++++++-------
.../Vehicle/Data/VehicleConfigData.cs | 9 +++----
.../Luban/DataTable/BulletCfg/DataBullet.cs | 2 +-
.../Config/Data/buffcfg_buffconfig.json | 26 +++++++++++++++++++
.../Config/Data/bulletcfg_bulletconfig.json | 24 +++++++++++++++++
.../Config/Data/skillcfg_skillconfig.json | 6 +++--
.../Skills/LogicAssets/logic_30003.json | 2 +-
.../Handlers/ISkillActionHandler.cs | 25 ++++++++++++++++--
.../InnerUI/SingleSkillEditorWindow.cs | 4 +++
.../SkillAction/SkillActionBehaviour.cs | 2 +-
12 files changed, 108 insertions(+), 24 deletions(-)
diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/BulletManager.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/BulletManager.cs
index 1f299b73b63..8e8d0ac8c69 100644
--- a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/BulletManager.cs
+++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/BulletManager.cs
@@ -416,6 +416,7 @@ namespace Gameplay.Bullet
result = _EmitLockPosBullet(targetUnit.transData.cellIndex, sender, bulletConfig);
break;
case EBulletType.UNIT_LOCK:
+ case EBulletType.UNIT_LOCK_BOOM:
// 锁单位
result = _EmitLockUnitBullet(targetUnit, sender, bulletConfig);
break;
@@ -478,6 +479,7 @@ namespace Gameplay.Bullet
result = _EmitLockPosBullet(cellIndex, sender, bulletConfig);
break;
case EBulletType.UNIT_LOCK:
+ case EBulletType.UNIT_LOCK_BOOM:
// 锁单位
result = _EmitLockUnitBullet(cellIndex, sender, bulletConfig);
break;
diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/Data/EBulletType.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/Data/EBulletType.cs
index 13b0fbefcea..8e1e6418192 100644
--- a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/Data/EBulletType.cs
+++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/Data/EBulletType.cs
@@ -25,8 +25,9 @@ namespace Gameplay.Bullet
public const int UNIT_LOCK = 2;
///
- /// ●方向子弹:向某方向发射子弹飞行物体,对路径上的目标进行检测,对命中目标执行逻辑
+ /// 追踪子弹,带爆炸:发射子弹类飞行物体
+ /// ●弃用:方向子弹:向某方向发射子弹飞行物体,对路径上的目标进行检测,对命中目标执行逻辑
///
- public const int DIR_FLY = 4;
+ public const int UNIT_LOCK_BOOM = 4;
}
}
diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/State/BulletStateUnitLockFly.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/State/BulletStateUnitLockFly.cs
index 1384ee47175..34ca890aff8 100644
--- a/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/State/BulletStateUnitLockFly.cs
+++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/Bullet/State/BulletStateUnitLockFly.cs
@@ -1,14 +1,8 @@
using LTGame;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Gameplay.Unit;
namespace Gameplay.Bullet
{
- using Gameplay.Common;
using UnityEngine;
public class BulletStateUnitLockFly : BaseBulletState
@@ -26,8 +20,8 @@ namespace Gameplay.Bullet
protected override void _OnEnter(NBaseState exitState, object param)
{
base._OnEnter(exitState, param);
- this.targetUnit = owner.lockUnit;
- this._targetPos = targetUnit.transData.pos;
+ targetUnit = owner.lockUnit;
+ _targetPos = targetUnit.transData.pos;
_flySpeed = owner.configData.FlySpeed;
}
@@ -50,7 +44,20 @@ namespace Gameplay.Bullet
{
owner.rootObj.transform.position = targetPos;
isFinished = true;
- nextState = EBulletState.DamageUnit;
+
+ switch (owner.configData.BulletType)
+ {
+ case EBulletType.UNIT_LOCK:
+ nextState = EBulletState.DamageUnit;
+ break;
+ case EBulletType.UNIT_LOCK_BOOM:
+ nextState = EBulletState.PosBoom;
+ break;
+ default:
+ DebugUtil.LogError("[BulletStateUnitLockFly: _OnRunning] 未支持的子弹类型: " + owner.configData.BulletType);
+ nextState = EBulletState.Destroy;
+ break;
+ }
}
else
{
diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/Vehicle/Data/VehicleConfigData.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/Vehicle/Data/VehicleConfigData.cs
index 145530e6ca7..960aa08301e 100644
--- a/ProjectNLD/Assets/Code/Scripts/Gameplay/Vehicle/Data/VehicleConfigData.cs
+++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/Vehicle/Data/VehicleConfigData.cs
@@ -176,10 +176,6 @@ namespace Gameplay.Vehicle.Data
}
}
- // TODO: 临时覆写
- skillId = 30001;
- DebugUtil.LogError("临时覆写技能ID:" + skillId);
-
_InitTerrainSpecialParam(rawConfig.MalaAdjustTerrain, rawConfig.SupperAdjustTerrain);
}
@@ -302,8 +298,9 @@ namespace Gameplay.Vehicle.Data
}
}
- // TODO: 强制指定技能id
- // skillId = 30009;
+ // TODO: 临时覆写
+ skillId = 30003;
+ DebugUtil.LogError("临时覆写技能ID:" + skillId);
_InitTerrainSpecialParam(rawConfig.Cfg.MalaAdjustTerrain, rawConfig.Cfg.SupperAdjustTerrain);
}
diff --git a/ProjectNLD/Assets/Code/Scripts/GenCode/Luban/DataTable/BulletCfg/DataBullet.cs b/ProjectNLD/Assets/Code/Scripts/GenCode/Luban/DataTable/BulletCfg/DataBullet.cs
index b59deaa46af..cdf1bcc9288 100644
--- a/ProjectNLD/Assets/Code/Scripts/GenCode/Luban/DataTable/BulletCfg/DataBullet.cs
+++ b/ProjectNLD/Assets/Code/Scripts/GenCode/Luban/DataTable/BulletCfg/DataBullet.cs
@@ -78,7 +78,7 @@ public sealed partial class DataBullet : Bright.Config.BeanBase
///
public string Name { get; private set; }
///
- /// 子弹类型
+ /// 子弹类型
1.直接伤害,无弹道
2.pos_lock,位置锁定,向地面发射子弹,走爆炸逻辑,有飞行弹道
3.unit_lock,单位锁定,向单位发射子弹,命中目标后走点对点伤害逻辑,不爆炸,有飞行弹道
4.unit_lock_boom,单位锁定,带爆炸,向单位发射子弹,命中后走爆炸逻辑,有飞行弹道
///
public int BulletType { get; private set; }
///
diff --git a/ProjectNLD/Assets/Config/Data/buffcfg_buffconfig.json b/ProjectNLD/Assets/Config/Data/buffcfg_buffconfig.json
index 4817a6707e5..6cfe9aba9d1 100644
--- a/ProjectNLD/Assets/Config/Data/buffcfg_buffconfig.json
+++ b/ProjectNLD/Assets/Config/Data/buffcfg_buffconfig.json
@@ -7566,6 +7566,32 @@
0.2
]
},
+ {
+ "ID": 10113,
+ "Name": "载具aoe子弹1",
+ "GroupId": 0,
+ "Level": 1,
+ "BuffEffectType": 2,
+ "CanTriggerOnDead": false,
+ "RepeatType": 0,
+ "BuffType": 7,
+ "ExistType": 0,
+ "ExExitType": 0,
+ "TriggerType": 0,
+ "MaxExistTime": 0,
+ "ExistEffectId": 0,
+ "BuffDisplayIcon": "",
+ "TiggerUnitTime": 0,
+ "AttackPowerLevel": 1000,
+ "PorpParams": [],
+ "FloatParams": [
+ 100,
+ 0.5,
+ 0.5,
+ 1,
+ 1
+ ]
+ },
{
"ID": 20001,
"Name": "特效buff",
diff --git a/ProjectNLD/Assets/Config/Data/bulletcfg_bulletconfig.json b/ProjectNLD/Assets/Config/Data/bulletcfg_bulletconfig.json
index 6c946468d2c..88b929a4e94 100644
--- a/ProjectNLD/Assets/Config/Data/bulletcfg_bulletconfig.json
+++ b/ProjectNLD/Assets/Config/Data/bulletcfg_bulletconfig.json
@@ -2268,6 +2268,30 @@
10112
]
},
+ {
+ "ID": 530060,
+ "Name": "载具aoe子弹1",
+ "BulletType": 3,
+ "PrefabPath": "Bullet_path_s",
+ "HitAudioId": "",
+ "DestroyEffectId": 0,
+ "FlySpeed": 50,
+ "FilterType": 3,
+ "JobFilters": [],
+ "FractionFilter": [],
+ "MoraleFilter": [],
+ "ExistBuffGroupIdFilter": [],
+ "ActiveOnCharacter": true,
+ "ActiveOnVehicle": true,
+ "ActiveOnBuild": true,
+ "CanUseOnPretent": true,
+ "AreaId": 2,
+ "LightDuring": 0,
+ "BuffList": [
+ 20001,
+ 10113
+ ]
+ },
{
"ID": 1001,
"Name": "指挥官技能-强制友军撤退",
diff --git a/ProjectNLD/Assets/Config/Data/skillcfg_skillconfig.json b/ProjectNLD/Assets/Config/Data/skillcfg_skillconfig.json
index 8b7c8a34a36..2392ebc3cf8 100644
--- a/ProjectNLD/Assets/Config/Data/skillcfg_skillconfig.json
+++ b/ProjectNLD/Assets/Config/Data/skillcfg_skillconfig.json
@@ -38538,7 +38538,7 @@
"InfluenceAreaId": 1,
"ShowAreaId": 2,
"ShowEffectId": -1,
- "IsEmitToFloor": false,
+ "IsEmitToFloor": true,
"PassiveBuffIds": [],
"IntParams": [],
"FloatParams": [],
@@ -38548,7 +38548,9 @@
"ChargeParam": 20,
"LogicId": 30003,
"ShowInSkillEditor": true,
- "ReferIds": [],
+ "ReferIds": [
+ 530060
+ ],
"IconPath": "Icon_skill_VehicleTest.png"
},
{
diff --git a/ProjectNLD/Assets/Config/Skills/LogicAssets/logic_30003.json b/ProjectNLD/Assets/Config/Skills/LogicAssets/logic_30003.json
index 47b0d80275b..db69b7b0da1 100644
--- a/ProjectNLD/Assets/Config/Skills/LogicAssets/logic_30003.json
+++ b/ProjectNLD/Assets/Config/Skills/LogicAssets/logic_30003.json
@@ -1 +1 @@
-{"skillId":30003,"actionList":[{"id":0,"subId":0,"floatParam1":0.0,"triggerTime":1.883333444595337,"actionType":4},{"id":0,"subId":0,"floatParam1":0.0,"triggerTime":1.883333444595337,"actionType":5},{"id":0,"subId":0,"floatParam1":0.0,"triggerTime":0.0,"actionType":1}]}
\ No newline at end of file
+{"skillId":30003,"actionList":[{"id":0,"subId":0,"floatParam1":0.0,"floatParam2":0.0,"floatParam3":0.0,"floatParam4":0.0,"intParam1":0,"intParam2":0,"intParam3":0,"intParam4":0,"stringParam1":"","triggerTime":1.0833334922790528,"actionType":4},{"id":0,"subId":0,"floatParam1":0.0,"floatParam2":0.0,"floatParam3":0.0,"floatParam4":0.0,"intParam1":0,"intParam2":0,"intParam3":0,"intParam4":0,"stringParam1":"","triggerTime":1.0833334922790528,"actionType":5},{"id":0,"subId":0,"floatParam1":0.0,"floatParam2":0.0,"floatParam3":0.0,"floatParam4":0.0,"intParam1":0,"intParam2":0,"intParam3":0,"intParam4":0,"stringParam1":"","triggerTime":0.0,"actionType":1}]}
\ No newline at end of file
diff --git a/ProjectNLD/Assets/Editor/SkillEditor/Handlers/ISkillActionHandler.cs b/ProjectNLD/Assets/Editor/SkillEditor/Handlers/ISkillActionHandler.cs
index 8e86949f1ed..1c28bcb4a42 100644
--- a/ProjectNLD/Assets/Editor/SkillEditor/Handlers/ISkillActionHandler.cs
+++ b/ProjectNLD/Assets/Editor/SkillEditor/Handlers/ISkillActionHandler.cs
@@ -60,13 +60,19 @@ namespace SkillEditor
EditorGUILayout.LabelField("无弹道子弹");
break;
case EBulletType.POS_LOCK:
- EditorGUILayout.LabelField("位置锁定导弹");
+ EditorGUILayout.LabelField("位置锁定导弹,爆炸");
EditorGUILayout.LabelField("子弹飞行速度:" + config.FlySpeed);
+ _DrawBulletBoomInfo(config.AreaId);
break;
case EBulletType.UNIT_LOCK:
- EditorGUILayout.LabelField("目标锁定导弹");
+ EditorGUILayout.LabelField("目标锁定导弹(不爆炸)");
EditorGUILayout.LabelField("子弹飞行速度:" + config.FlySpeed);
break;
+ case EBulletType.UNIT_LOCK_BOOM:
+ EditorGUILayout.LabelField("目标锁定导弹(带爆炸)");
+ EditorGUILayout.LabelField("子弹飞行速度:" + config.FlySpeed);
+ _DrawBulletBoomInfo(config.AreaId);
+ break;
default:
EditorGUILayout.LabelField($"子弹类型:{config.BulletType} - 暂不支持的子弹类型");
break;
@@ -78,6 +84,21 @@ namespace SkillEditor
}
}
+ private void _DrawBulletBoomInfo(int bulletAreaId)
+ {
+ EditorGUILayout.LabelField("爆炸区域ID:" + bulletAreaId);
+ if (EditorTableManager.instance.tables.AreaConfig.DataMap.TryGetValue((int)bulletAreaId, out var config))
+ {
+ EditorGUILayout.LabelField("爆炸区域名字:" + config.Name);
+ EditorGUILayout.LabelField("爆炸区域描述:" + config.DESC);
+ }
+ else
+ {
+ EditorGUILayout.HelpBox("无效的爆炸区域id:" + bulletAreaId, MessageType.Error);
+ }
+
+ }
+
public abstract void HandleAction(SkillActionClip clip);
}
}
diff --git a/ProjectNLD/Assets/Editor/SkillEditor/InnerUI/SingleSkillEditorWindow.cs b/ProjectNLD/Assets/Editor/SkillEditor/InnerUI/SingleSkillEditorWindow.cs
index 884c675cdc5..ed0b3f0c564 100644
--- a/ProjectNLD/Assets/Editor/SkillEditor/InnerUI/SingleSkillEditorWindow.cs
+++ b/ProjectNLD/Assets/Editor/SkillEditor/InnerUI/SingleSkillEditorWindow.cs
@@ -491,6 +491,10 @@ namespace SkillEditor
var selectConfig = _tables.VehicleConfig.DataList[_selectVehicleIndex];
var modelPath = PathEx.GetVehicleGameModelPath(selectConfig.ID);
objAsset = AssetDatabase.LoadAssetAtPath(modelPath);
+ if (objAsset == null)
+ {
+ throw new Exception("该载具没有对应的模型:" + modelPath);
+ }
// 实例化模型
obj = Instantiate(objAsset, _parent_zhujue, false);
diff --git a/ProjectNLD/Assets/Editor/SkillEditor/Timeline/SkillAction/SkillActionBehaviour.cs b/ProjectNLD/Assets/Editor/SkillEditor/Timeline/SkillAction/SkillActionBehaviour.cs
index 2b66459025c..458400057e9 100644
--- a/ProjectNLD/Assets/Editor/SkillEditor/Timeline/SkillAction/SkillActionBehaviour.cs
+++ b/ProjectNLD/Assets/Editor/SkillEditor/Timeline/SkillAction/SkillActionBehaviour.cs
@@ -292,7 +292,7 @@ namespace SkillEditor
var fireTrans = skeleon.GetBone("Fire");
if (config.BulletType == EBulletType.UNIT_LOCK
- || config.BulletType == EBulletType.DIR_FLY)
+ || config.BulletType == EBulletType.UNIT_LOCK_BOOM)
{
var fireTransPosition = fireTrans.position;
_effectObj.transform.position = fireTransPosition;