Animations now component based

This commit is contained in:
Simon Lübeß
2021-09-13 20:52:41 +02:00
parent 44374a84a7
commit b0b5f76423
3 changed files with 98 additions and 55 deletions
@@ -6,6 +6,8 @@ namespace GlitchyEngine.World
{
private AnimationClip _animationClip;
private SkeletonPose _pose;
public AnimationClip AnimationClip
{
get => _animationClip;
@@ -20,11 +22,20 @@ namespace GlitchyEngine.World
}
}
public float TimeIndex;
public float TimeScale;
public bool IsPlaying;
public SkeletonPose Pose => _pose;
public static void DisposeComponent(void* component)
{
Self* animationComponent = (Self*)component;
animationComponent._animationClip?.ReleaseRef();
delete animationComponent._pose;
}
}
}