mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
38 lines
584 B
Beef
38 lines
584 B
Beef
using GlitchyEngine.Renderer.Animation;
|
|
|
|
namespace GlitchyEngine.World
|
|
{
|
|
struct AnimationComponent : IDisposableComponent
|
|
{
|
|
private AnimationClip _animationClip;
|
|
|
|
private SkeletonPose _pose;
|
|
|
|
public AnimationClip AnimationClip
|
|
{
|
|
get => _animationClip;
|
|
set mut
|
|
{
|
|
if(_animationClip == value)
|
|
return;
|
|
|
|
SetReference!(_animationClip, value);
|
|
}
|
|
}
|
|
|
|
public float TimeIndex;
|
|
|
|
public float TimeScale;
|
|
|
|
public bool IsPlaying;
|
|
|
|
public SkeletonPose Pose => _pose;
|
|
|
|
public void Dispose()
|
|
{
|
|
_animationClip?.ReleaseRef();
|
|
delete _pose;
|
|
}
|
|
}
|
|
}
|