mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Basic Entity hierarchy sync
This commit is contained in:
@@ -56,5 +56,10 @@ namespace GlitchyEngine.Core
|
||||
|
||||
return .Ok;
|
||||
}
|
||||
|
||||
public static explicit operator uint64(UUID id)
|
||||
{
|
||||
return id._uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,15 +49,39 @@ namespace GlitchyEngine
|
||||
container.Clear();
|
||||
}
|
||||
|
||||
public static mixin DeleteDictionaryAndReleaseValues(var container)
|
||||
public static mixin DeleteDictionaryAndReleaseValues(var dictionary)
|
||||
{
|
||||
if (container != null)
|
||||
if (dictionary != null)
|
||||
{
|
||||
for (var value in container)
|
||||
for (var value in dictionary)
|
||||
{
|
||||
value.value?.ReleaseRef();
|
||||
}
|
||||
delete container;
|
||||
delete dictionary;
|
||||
}
|
||||
}
|
||||
|
||||
public static mixin ClearDictionaryAndDisposeValues(var dictionary)
|
||||
{
|
||||
if (dictionary != null)
|
||||
{
|
||||
for (var value in dictionary)
|
||||
{
|
||||
value.value?.Dispose();
|
||||
}
|
||||
dictionary.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static mixin DeleteDictionaryAndDisposeValues(var dictionary)
|
||||
{
|
||||
if (dictionary != null)
|
||||
{
|
||||
for (var value in dictionary)
|
||||
{
|
||||
value.value?.Dispose();
|
||||
}
|
||||
delete dictionary;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,9 +137,9 @@ namespace GlitchyEngine.Renderer
|
||||
if (slices.Length == 0)
|
||||
return .Err;
|
||||
|
||||
if (slices.Length != 1)
|
||||
if (nativeTexture != null && slices.Length != 1)
|
||||
{
|
||||
Runtime.NotImplemented("PlatformSetData(Span<TextureSliceData> slices) with more than 1 slice is not implemented yet.");
|
||||
Runtime.NotImplemented("PlatformSetData(Span<TextureSliceData> slices) with more than 1 slice is not implemented for already created textures.");
|
||||
}
|
||||
|
||||
if(nativeTexture == null)
|
||||
|
||||
@@ -1086,6 +1086,11 @@ namespace GlitchyEngine.World
|
||||
handler(entity, componentType, component);
|
||||
}
|
||||
}
|
||||
|
||||
public WorldEnumerator GetEntities()
|
||||
{
|
||||
return _ecsWorld.Enumerate();
|
||||
}
|
||||
|
||||
public WorldEnumerator<TComponent> GetEntities<TComponent>() where TComponent : struct
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user