【战斗】修改第一次射击时间为百分比
parent
cc5d4edca3
commit
1c20671996
|
|
@ -34,7 +34,6 @@ namespace Gameplay.Buff
|
|||
{
|
||||
DebugUtil.Log("原始射击间隔:{0},射速加成:{1}", owner.fightData.baseShootCd, owner.fightData.p_shootCdScale);
|
||||
owner.fightData.shootCd = owner.fightData.baseShootCd * (1 + (1 / (1 + owner.fightData.p_shootCdScale) - 1));
|
||||
owner.fightData.firstShootTime = owner.fightData.p_firstShootTime * (1 + (1 / (1 + owner.fightData.p_shootCdScale) - 1));
|
||||
DebugUtil.Log("新射击间隔:{0}", owner.fightData.shootCd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,13 @@ namespace Gameplay.Character
|
|||
/// </summary>
|
||||
public float shootCD;
|
||||
/// <summary>
|
||||
/// 首次攻击时间
|
||||
/// 首次攻击时间,百分比
|
||||
/// </summary>
|
||||
public float firstShootTime;
|
||||
public float fireTimeProgress
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 最大子弹数量
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ namespace Gameplay.Character
|
|||
owner.fightData.perShootBulletCount = configData.perShootCount;
|
||||
owner.fightData.criticalRate = configData.criticalRate;
|
||||
owner.fightData.criticalScale = configData.criticalScale;
|
||||
owner.fightData.firstShootTime = configData.firstShootTime;
|
||||
owner.fightData.p_firstShootTime = configData.firstShootTime;
|
||||
owner.fightData.fireTimeProgress = configData.fireTimeProgress;
|
||||
owner.fightData.moraleAttack = configData.moraleAttack;
|
||||
owner.fightData.reloadTime = configData.reloadTime;
|
||||
owner.fightData.baseReloadTime = configData.reloadTime;
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ namespace Gameplay.Character
|
|||
owner.Log($"无有效路径: from:{from} to:{to}");
|
||||
// isFinished = true;
|
||||
// nextState = EDownState.Idle;
|
||||
|
||||
_DrawDebugLine(from, to);
|
||||
_HandleForNoWay();
|
||||
}
|
||||
|
||||
|
|
@ -411,6 +411,15 @@ namespace Gameplay.Character
|
|||
}
|
||||
}
|
||||
|
||||
private void _DrawDebugLine(int from, int to)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
var fromPos = _map.TGSCellIndex2WorldPosition(from);
|
||||
var toPos = _map.TGSCellIndex2WorldPosition(to);
|
||||
Debug.DrawLine(fromPos, toPos, Color.red, 0.1f);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool _stopOnNoWay = true;
|
||||
|
||||
private void _HandleForNoWay()
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Gameplay.Character
|
|||
|
||||
_shootCd = owner.fightData.shootCd;
|
||||
|
||||
_remainShootTime = owner.fightData.firstShootTime;
|
||||
_remainShootTime = owner.fightData.fireTimeProgress * _shootCd;
|
||||
if (_remainShootTime > _shootCd)
|
||||
{
|
||||
DebugUtil.LogWarning("配置的开枪时间短于开枪CD,已自动重置,请检查配表");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Gameplay.Character
|
|||
{
|
||||
base._OnEnter(exitState, param);
|
||||
_shootCd = owner.fightData.shootCd;
|
||||
_remainShootTime = owner.fightData.firstShootTime;
|
||||
_remainShootTime = owner.fightData.fireTimeProgress * _shootCd;
|
||||
|
||||
if (_remainShootTime > _shootCd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Gameplay.Character.Utils
|
|||
configData.attack = Mathf.CeilToInt(monsterTConfig.Attack * monsterConfig.AttackFix * monsterLevelConfig.AttackLevelUpTemplate);
|
||||
var shootCd = 1f / monsterTConfig.ShootSpeed;
|
||||
configData.shootCD = shootCd;
|
||||
configData.firstShootTime = monsterTConfig.FirstShootTime;
|
||||
configData.fireTimeProgress = monsterTConfig.FirstShootTime;
|
||||
configData.maxBulletCount = monsterTConfig.ManagazinContain;
|
||||
configData.reloadTime = monsterTConfig.ChangeBulletTime;
|
||||
configData.defense = Mathf.CeilToInt(monsterTConfig.Defence * monsterConfig.DefenceFix * monsterLevelConfig.DefenceLevelUpTemplate);
|
||||
|
|
@ -137,7 +137,7 @@ namespace Gameplay.Character.Utils
|
|||
configData.attack = levelAttack;
|
||||
var shootCd = 1f / characterData.ShootSpeed;
|
||||
configData.shootCD = shootCd;
|
||||
configData.firstShootTime = characterData.FirstShootTime;
|
||||
configData.fireTimeProgress = characterData.FirstShootTime;
|
||||
configData.maxBulletCount = characterData.ManagazinContain;
|
||||
configData.reloadTime = characterData.ChangeBulletTime;
|
||||
configData.defense = levelDefence;
|
||||
|
|
|
|||
|
|
@ -158,10 +158,9 @@ namespace Gameplay.Unit.Data
|
|||
public ObscuredInt moraleAttack;
|
||||
|
||||
/// <summary>
|
||||
/// 第一次开枪时间
|
||||
/// 开枪时间百分比
|
||||
/// </summary>
|
||||
public ObscuredFloat firstShootTime;
|
||||
public ObscuredFloat p_firstShootTime;
|
||||
public ObscuredFloat fireTimeProgress;
|
||||
|
||||
/// <summary>
|
||||
/// 士气恢复缩放
|
||||
|
|
@ -307,8 +306,7 @@ namespace Gameplay.Unit.Data
|
|||
to.criticalRate = criticalRate;
|
||||
to.criticalScale = criticalScale;
|
||||
to.moraleAttack = moraleAttack;
|
||||
to.firstShootTime = firstShootTime;
|
||||
to.p_firstShootTime = p_firstShootTime;
|
||||
to.fireTimeProgress = fireTimeProgress;
|
||||
to.moraleRecoverScale = moraleRecoverScale;
|
||||
to.reloadTime = reloadTime;
|
||||
to.baseReloadTime = baseReloadTime;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Gameplay.Vehicle
|
|||
base._OnEnter(exitState, param);
|
||||
|
||||
owner.remainShootTime = owner.owner.fightData.shootCd;
|
||||
_shootTime = owner.owner.fightData.firstShootTime;
|
||||
_shootTime = owner.owner.fightData.fireTimeProgress * owner.owner.fightData.shootCd;
|
||||
|
||||
if (owner.rawAnim != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ namespace Gameplay.Vehicle.Data
|
|||
owner.fightData.perShootBulletCount = configData.perShootCount;
|
||||
owner.fightData.criticalRate = configData.criticalRate;
|
||||
owner.fightData.criticalScale = configData.criticalDamageScale;
|
||||
owner.fightData.firstShootTime = configData.firstShootTime;
|
||||
owner.fightData.p_firstShootTime = configData.firstShootTime;
|
||||
owner.fightData.fireTimeProgress = configData.firstShootTime;
|
||||
owner.fightData.moraleAttack = configData.moraleAttack;
|
||||
owner.fightData.reloadTime = configData.reloadTime;
|
||||
owner.fightData.baseReloadTime = configData.reloadTime;
|
||||
|
|
|
|||
Loading…
Reference in New Issue