Add WeaponFeedback component and AddressableManagerWindow meta file
- Implemented WeaponFeedback class for handling weapon-related feedbacks such as hit effects and attack sounds. - Added meta file for AddressableManagerWindow to manage addressable assets. - Included a new jump.data file for profiler data.
This commit is contained in:
@@ -44,6 +44,8 @@ namespace BaseGames.Parry
|
||||
private ParryPhase _phase = ParryPhase.Inactive;
|
||||
private float _phaseTimer;
|
||||
private float _cooldownTimer;
|
||||
// 缓存 WaitForSecondsRealtime,避免每次完美弹反都触发 GC 分配
|
||||
private WaitForSecondsRealtime _bulletTimeWait;
|
||||
|
||||
public ParryPhase CurrentPhase => _phase;
|
||||
/// <summary>是否处于弹反有效窗口(供外部检测)。</summary>
|
||||
@@ -74,6 +76,13 @@ namespace BaseGames.Parry
|
||||
Debug.Assert(_config != null, "[ParrySystem] _config 未赋值,请在 Inspector 中指定 ParryConfigSO。", this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 在 Start 中初始化,确保 _config 已被赋值(Awake 之后)
|
||||
if (_config != null)
|
||||
_bulletTimeWait = new WaitForSecondsRealtime(_config.BulletTimeDuration);
|
||||
}
|
||||
|
||||
/// <summary>由 PlayerController 在 Awake 中注入 InputReader,无需在 Inspector 单独指定。</summary>
|
||||
public void SetInputReader(InputReaderSO reader)
|
||||
{
|
||||
@@ -206,7 +215,7 @@ namespace BaseGames.Parry
|
||||
private IEnumerator ApplyBulletTime()
|
||||
{
|
||||
Time.timeScale = _config.BulletTimeScale;
|
||||
yield return new WaitForSecondsRealtime(_config.BulletTimeDuration);
|
||||
yield return _bulletTimeWait;
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user