1
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using BITKit.Animations;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public class MonoAnimatorProxy:MonoBehaviour,IAnimator
|
||||
{
|
||||
[SerializeField] private MonoBehaviour monoBehaviour;
|
||||
private IAnimator _animatorImplementation => (IAnimator)monoBehaviour;
|
||||
public void Play(string name, int index = 0, float normalizedTimeOffset = 0)
|
||||
{
|
||||
_animatorImplementation.Play(name, index, normalizedTimeOffset);
|
||||
}
|
||||
|
||||
public void CrossFade(string name, float duration, int index = 0, float normalizedTimeOffset = 0)
|
||||
{
|
||||
_animatorImplementation.CrossFade(name, duration, index, normalizedTimeOffset);
|
||||
}
|
||||
|
||||
public void OnStateEnter(int index, string name)
|
||||
{
|
||||
_animatorImplementation.OnStateEnter(index, name);
|
||||
}
|
||||
|
||||
public void OnStateExit(int index, string name)
|
||||
{
|
||||
_animatorImplementation.OnStateExit(index, name);
|
||||
}
|
||||
|
||||
public float3 GetRootVelocity()
|
||||
{
|
||||
return _animatorImplementation.GetRootVelocity();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ec5e9dfed974baf9ce327cdc717ac6c
|
||||
timeCreated: 1689957890
|
Reference in New Issue
Block a user