1
0
forked from cgvr/DeltaVR

deltavr multiplayer 2.0

This commit is contained in:
Toomas Tamm
2023-05-08 15:56:10 +03:00
parent 978809a002
commit 07b9b9e2f4
10937 changed files with 2968397 additions and 1521012 deletions

View File

@@ -0,0 +1,29 @@
namespace UnityEngine.XR.Content.Animation
{
/// <summary>
/// Enables a component to react to the 'ActionBegin' animation event.
/// </summary>
/// <seealso cref="IAnimationEventActionFinished"/>
public interface IAnimationEventActionBegin
{
void ActionBegin(string label);
}
/// <summary>
/// Calls the 'ActionBegin' function on any supported component when the target animation begins.
/// </summary>
/// <seealso cref="AnimationEventActionFinished"/>
public class AnimationEventActionBegin : StateMachineBehaviour
{
[SerializeField]
[Tooltip("A label identifying the animation that has started.")]
string m_Label;
/// <inheritdoc />
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
var eventReceiver = animator.GetComponentInParent<IAnimationEventActionBegin>();
eventReceiver?.ActionBegin(m_Label);
}
}
}