调整 convert.py 转换逻辑 + 规划后续开发

This commit is contained in:
2026-03-17 13:21:49 +08:00
parent 59f1d02a18
commit c5d113b35f
15 changed files with 572 additions and 123 deletions
@@ -13,8 +13,6 @@ namespace Entity.Weapon
{
#region Property
private const string SectorAngleParamKey = "SectorAngle";
private WeaponSlashData _weaponData;
private Quaternion _cachedRotation;
@@ -184,15 +182,8 @@ namespace Entity.Weapon
_attackRadius = Mathf.Max(0.1f, _weaponData.AttackRange);
_attackRadiusSqr = _attackRadius * _attackRadius;
_sectorAngle = 90f;
if (_weaponData.Params != null &&
_weaponData.Params.TryGetValue(SectorAngleParamKey.ToLower(), out string rawAngle))
{
if (float.TryParse(rawAngle, out float parsedAngle))
{
_sectorAngle = Mathf.Clamp(parsedAngle, 1f, 360f);
}
}
float configuredSectorAngle = _weaponData.ParamsData != null ? _weaponData.ParamsData.SectorAngle : 0f;
_sectorAngle = configuredSectorAngle > 0f ? Mathf.Clamp(configuredSectorAngle, 1f, 360f) : 90f;
int capacity = Mathf.Max(1, _maxHitColliders);
if (_hitResults == null || _hitResults.Length != capacity)