mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added basic AnimationComponent
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
using GlitchyEngine.Renderer.Animation;
|
||||||
|
|
||||||
|
namespace GlitchyEngine.World
|
||||||
|
{
|
||||||
|
struct AnimationComponent : IDisposableComponent
|
||||||
|
{
|
||||||
|
private AnimationClip _animationClip;
|
||||||
|
|
||||||
|
public AnimationClip AnimationClip
|
||||||
|
{
|
||||||
|
get => _animationClip;
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
if(_animationClip == value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_animationClip?.ReleaseRef();
|
||||||
|
_animationClip = value;
|
||||||
|
_animationClip?.AddRef();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DisposeComponent(void* component)
|
||||||
|
{
|
||||||
|
Self* animationComponent = (Self*)component;
|
||||||
|
|
||||||
|
animationComponent._animationClip?.ReleaseRef();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user