Split up sprite and circle renderer component

This commit is contained in:
Simon Lübeß
2023-03-19 12:19:22 +01:00
parent edcec02e94
commit 2ba4b68e09
12 changed files with 111 additions and 46 deletions
@@ -0,0 +1,37 @@
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;
}
}
}