Simplified dispose function of DisposableComponents

This commit is contained in:
Simon Lübeß
2021-12-30 16:52:13 +01:00
parent b3ab30e72a
commit b555cc37d1
7 changed files with 26 additions and 29 deletions
@@ -40,12 +40,10 @@ namespace GlitchyEngine.World
}
}
public static void DisposeComponent(void* component)
public void Dispose()
{
Self* meshRenderComponent = (Self*)component;
meshRenderComponent._material?.ReleaseRef();
meshRenderComponent._skeleton?.ReleaseRef();
_material?.ReleaseRef();
_skeleton?.ReleaseRef();
}
}
}