Make combine animations and smacks ground Pulve

This commit is contained in:
Michal Pikulski
2025-10-27 14:43:24 +01:00
parent f5c1ae51cd
commit fdfddaec95
13 changed files with 788 additions and 70 deletions

View File

@@ -0,0 +1,40 @@
using UnityEngine;
namespace Movement
{
/// <summary>
/// Bridge script that forwards Animation Events from the character art child object
/// to the FollowerController on the parent GameObject.
/// Attach this to the same GameObject that has the Animator component.
/// </summary>
public class FollowerAnimationEventBridge : MonoBehaviour
{
[SerializeField] private FollowerController followerController;
void Awake()
{
// Find the FollowerController on the parent
if (followerController == null)
{
followerController = GetComponentInParent<FollowerController>();
}
if (followerController == null)
{
Debug.LogError("[FollowerAnimationEventBridge] Could not find FollowerController in parent. This script must be on a child of the FollowerController.");
}
}
/// <summary>
/// Called by Animation Events. Forwards to the parent FollowerController.
/// </summary>
public void OnStationaryAnimationComplete()
{
if (followerController != null)
{
followerController.OnStationaryAnimationComplete();
}
}
}
}