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:
2026-05-22 22:03:32 +08:00
parent 3e1f234ddc
commit b7baf7ad6a
44 changed files with 1783 additions and 1927 deletions

View File

@@ -11,8 +11,9 @@ namespace BaseGames.Combat.StatusEffects
public override StatusEffectType EffectType => StatusEffectType.Fire;
public override int MaxStacks => 1;
private static readonly StatusEffectType[] s_MutualExclusions = { StatusEffectType.Freeze };
/// <summary>施加燃烧时移除冻结(火冰互斥)。</summary>
public override StatusEffectType[] MutualExclusions => new[] { StatusEffectType.Freeze };
public override StatusEffectType[] MutualExclusions => s_MutualExclusions;
public FireEffect()
{

View File

@@ -27,6 +27,8 @@ namespace BaseGames.Combat.StatusEffects
// ── Shader 渲染MaterialPropertyBlock不修改共享材质─────────
private SpriteRenderer _renderer;
private MaterialPropertyBlock _propBlock;
// 缓存 Shader 属性 ID避免每次调用 SetShaderParam 都做字符串哈希查找
private readonly Dictionary<string, int> _shaderPropIds = new();
// ── DoT 伤害代理(由 StatusEffect.OnTick 通过 Owner 调用)──────────
private IDamageable _damageable;
@@ -135,8 +137,13 @@ namespace BaseGames.Combat.StatusEffects
public void SetShaderParam(string param, float value)
{
if (_renderer == null) return;
if (!_shaderPropIds.TryGetValue(param, out int propId))
{
propId = Shader.PropertyToID(param);
_shaderPropIds[param] = propId;
}
_renderer.GetPropertyBlock(_propBlock);
_propBlock.SetFloat(param, value);
_propBlock.SetFloat(propId, value);
_renderer.SetPropertyBlock(_propBlock);
}