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:
@@ -12,6 +12,7 @@
|
||||
"BaseGames.Input",
|
||||
"BaseGames.Player",
|
||||
"BaseGames.Combat",
|
||||
"BaseGames.Feedback",
|
||||
"BaseGames.Skills",
|
||||
"Kybernetik.Animancer"
|
||||
],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using BaseGames.Player;
|
||||
using BaseGames.Input;
|
||||
using BaseGames.Feedback;
|
||||
|
||||
namespace BaseGames.Spells
|
||||
{
|
||||
@@ -24,9 +25,17 @@ namespace BaseGames.Spells
|
||||
// 当前装备的法术(单槽;如需多槽可扩展为数组)
|
||||
private SpellSO _equippedSpell;
|
||||
private float _cooldownRemaining;
|
||||
private IFeedbackPlayer _feedback;
|
||||
|
||||
// ── 生命周期 ──────────────────────────────────────────────────────────
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_feedback = GetComponentInChildren<IFeedbackPlayer>()
|
||||
?? GetComponentInParent<IFeedbackPlayer>()
|
||||
?? NullFeedbackPlayer.Instance;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (_input != null)
|
||||
@@ -86,6 +95,9 @@ namespace BaseGames.Spells
|
||||
|
||||
_cooldownRemaining = _equippedSpell.cooldown;
|
||||
|
||||
// 施放反馈
|
||||
_feedback.TriggerPreset("spell_cast");
|
||||
|
||||
ExecuteSpellEffect(_equippedSpell);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user