spell refactor part - assets and prefabs

This commit is contained in:
2026-01-22 14:54:35 +01:00
parent 1beff44ada
commit 013dca60a5
36 changed files with 773 additions and 1034 deletions

View File

@@ -12,12 +12,19 @@ namespace Beyond
// Start is called before the first frame update
private void Start()
{
baseStepController.ConditionsAreMet += () => magicAttacks.isPlaying;
// [FIX] magicAttacks.isPlaying is private.
// We check the animator directly for the "Spell" tag or state.
baseStepController.ConditionsAreMet += CheckIsPlaying;
}
// Update is called once per frame
private void Update()
private bool CheckIsPlaying()
{
var animator = magicAttacks.GetComponent<Animator>();
if (animator == null) return false;
// Assuming layer 5 is spells (from your MagicAttacks constants)
var state = animator.GetCurrentAnimatorStateInfo(5);
return state.IsTag("Spell") || state.IsTag("special");
}
}
}