mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
change defines
This commit is contained in:
parent
3e8cb3f8ff
commit
a53fa7e717
@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
using static DCFApixels.DragonECS.EcsGroup.ThrowHelper;
|
||||
#endif
|
||||
|
||||
@ -149,7 +149,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (index < 0 || index >= Count) ThrowArgumentOutOfRange();
|
||||
#endif
|
||||
return _dense[index];
|
||||
@ -198,7 +198,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal void AddInternal(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (Has(entityID)) ThrowAlreadyContains(entityID);
|
||||
#endif
|
||||
if (++_count >= _dense.Length)
|
||||
@ -216,7 +216,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal void RemoveInternal(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowDoesNotContain(entityID);
|
||||
#endif
|
||||
_dense[_sparse[entityID]] = _dense[_count];
|
||||
@ -249,7 +249,7 @@ namespace DCFApixels.DragonECS
|
||||
public void CopyFrom(EcsReadonlyGroup group) => CopyFrom(group.GetGroupInternal());
|
||||
public void CopyFrom(EcsGroup group)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (group.World != _source) throw new ArgumentException("groupFilter.WorldIndex != WorldIndex");
|
||||
#endif
|
||||
if (_count > 0)
|
||||
@ -285,7 +285,7 @@ namespace DCFApixels.DragonECS
|
||||
public Span<int> ToSpan() => new Span<int>(_dense, 0, _count);
|
||||
public Span<int> ToSpan(int start, int length)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (start + length > _count) ThrowArgumentOutOfRangeException();
|
||||
#endif
|
||||
return new Span<int>(_dense, start, length);
|
||||
@ -299,7 +299,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <summary>as Union sets</summary>
|
||||
public void UnionWith(EcsGroup group)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_source != group.World) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
foreach (var item in group)
|
||||
@ -313,7 +313,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <summary>as Except sets</summary>
|
||||
public void ExceptWith(EcsGroup group)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_source != group.World) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
foreach (var item in this)
|
||||
@ -327,7 +327,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <summary>as Intersect sets</summary>
|
||||
public void AndWith(EcsGroup group)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (World != group.World) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
foreach (var item in this)
|
||||
@ -341,7 +341,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <summary>as Symmetric Except sets</summary>
|
||||
public void XorWith(EcsGroup group)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_source != group.World) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
foreach (var item in group)
|
||||
@ -365,7 +365,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <returns>new group from pool</returns>
|
||||
public static EcsGroup Union(EcsGroup a, EcsGroup b)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (a._source != b._source) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
EcsGroup result = a._source.GetFreeGroup();
|
||||
@ -379,7 +379,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <returns>new group from pool</returns>
|
||||
public static EcsGroup Except(EcsGroup a, EcsGroup b)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (a._source != b._source) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
EcsGroup result = a._source.GetFreeGroup();
|
||||
@ -392,7 +392,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <returns>new group from pool</returns>
|
||||
public static EcsGroup And(EcsGroup a, EcsGroup b)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (a._source != b._source) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
EcsGroup result = a._source.GetFreeGroup();
|
||||
@ -406,7 +406,7 @@ namespace DCFApixels.DragonECS
|
||||
/// <returns>new group from pool</returns>
|
||||
public static EcsGroup Xor(EcsGroup a, EcsGroup b)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (a._source != b._source) ThrowArgumentDifferentWorldsException();
|
||||
#endif
|
||||
EcsGroup result = a._source.GetFreeGroup();
|
||||
@ -524,7 +524,7 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region ThrowHalper
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
internal static class ThrowHelper
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
|
@ -85,7 +85,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Run()
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
CheckBeforeInitForMethod(nameof(Run));
|
||||
CheckAfterDestroyForMethod(nameof(Run));
|
||||
#endif
|
||||
@ -93,7 +93,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public void Destroy()
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
CheckBeforeInitForMethod(nameof(Run));
|
||||
#endif
|
||||
if (_isDestoryed == true)
|
||||
@ -107,7 +107,7 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region StateChecks
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
private void CheckBeforeInitForMethod(string methodName)
|
||||
{
|
||||
if (!_isInit)
|
||||
|
@ -54,7 +54,7 @@ namespace DCFApixels.DragonECS
|
||||
.Where(type => type.BaseType != null && type.BaseType.IsGenericType && runnerBaseType == type.BaseType.GetGenericTypeDefinition()));
|
||||
}
|
||||
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
for (int i = 0; i < runnerHandlerTypes.Count; i++)
|
||||
{
|
||||
var e = CheckRunnerValide(runnerHandlerTypes[i]);
|
||||
@ -129,7 +129,7 @@ namespace DCFApixels.DragonECS
|
||||
private static Type _subclass;
|
||||
internal static void Register(Type subclass)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_subclass != null)
|
||||
{
|
||||
throw new EcsRunnerImplementationException($"The Runner<{typeof(TInterface).FullName}> can have only one implementing subclass");
|
||||
|
@ -85,7 +85,7 @@ namespace DCFApixels.DragonECS
|
||||
private void IncludeImplicit<TComponent>()
|
||||
{
|
||||
int id = _world.GetComponentID<TComponent>();
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_inc.Contains(id) || _exc.Contains(id)) throw new EcsFrameworkException($"{typeof(TComponent).Name} already in constraints list.");
|
||||
#endif
|
||||
_inc.Add(_world.GetComponentID<TComponent>());
|
||||
@ -93,7 +93,7 @@ namespace DCFApixels.DragonECS
|
||||
private void ExcludeImplicit<TComponent>()
|
||||
{
|
||||
int id = _world.GetComponentID<TComponent>();
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (_inc.Contains(id) || _exc.Contains(id)) throw new EcsFrameworkException($"{typeof(TComponent).Name} already in constraints list.");
|
||||
#endif
|
||||
_exc.Add(_world.GetComponentID<TComponent>());
|
||||
|
@ -32,7 +32,7 @@
|
||||
{
|
||||
using (_executeWhere.Auto())
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (sourceGroup.IsNull) throw new System.ArgumentNullException();//TODO составить текст исключения.
|
||||
#endif
|
||||
_subject.GetIteratorFor(sourceGroup).CopyTo(_filteredGroup);
|
||||
@ -59,7 +59,7 @@
|
||||
}
|
||||
public EcsGroup.Enumerator GetEnumerator()
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!IsRelevant) throw new System.InvalidOperationException();//TODO составить текст исключения.
|
||||
#endif
|
||||
return group.GetEnumerator();
|
||||
|
@ -57,7 +57,7 @@ namespace DCFApixels.DragonECS
|
||||
public ref T Add(int entityID)
|
||||
{
|
||||
ref int itemIndex = ref _mapping[entityID];
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (itemIndex > 0) ThrowAlreadyHasComponent<T>(entityID);
|
||||
#endif
|
||||
if (_recycledItemsCount > 0)
|
||||
@ -78,7 +78,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ref T Get(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
_listeners.InvokeOnGet(entityID);
|
||||
@ -87,7 +87,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ref readonly T Read(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
return ref _items[_mapping[entityID]];
|
||||
@ -121,7 +121,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public void Del(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
ref int itemIndex = ref _mapping[entityID];
|
||||
@ -140,14 +140,14 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public void Copy(int fromEntityID, int toEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(fromEntityID)) ThrowNotHaveComponent<T>(fromEntityID);
|
||||
#endif
|
||||
_componentCopyHandler.Copy(ref Get(fromEntityID), ref TryAddOrGet(toEntityID));
|
||||
}
|
||||
public void Copy(int fromEntityID, EcsWorld toWorld, int toEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(fromEntityID)) ThrowNotHaveComponent<T>(fromEntityID);
|
||||
#endif
|
||||
_componentCopyHandler.Copy(ref Get(fromEntityID), ref toWorld.GetPool<T>().TryAddOrGet(toEntityID));
|
||||
|
@ -43,7 +43,7 @@ namespace DCFApixels.DragonECS
|
||||
#region Method
|
||||
public void Add(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (Has(entityID)) ThrowAlreadyHasComponent<T>(entityID);
|
||||
#endif
|
||||
_count++;
|
||||
@ -68,7 +68,7 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public void Del(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
_mapping[entityID] = false;
|
||||
@ -82,14 +82,14 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
public void Copy(int fromEntityID, int toEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(fromEntityID)) ThrowNotHaveComponent<T>(fromEntityID);
|
||||
#endif
|
||||
TryAdd(toEntityID);
|
||||
}
|
||||
public void Copy(int fromEntityID, EcsWorld toWorld, int toEntityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(fromEntityID)) ThrowNotHaveComponent<T>(fromEntityID);
|
||||
#endif
|
||||
toWorld.GetPool<T>().TryAdd(toEntityID);
|
||||
@ -138,14 +138,14 @@ namespace DCFApixels.DragonECS
|
||||
}
|
||||
ref readonly T IEcsPool<T>.Read(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
return ref _fakeComponent;
|
||||
}
|
||||
ref T IEcsPool<T>.Get(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
return ref _fakeComponent;
|
||||
@ -153,14 +153,14 @@ namespace DCFApixels.DragonECS
|
||||
void IEcsPool.AddRaw(int entityID, object dataRaw) => Add(entityID);
|
||||
object IEcsPool.GetRaw(int entityID)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
return _fakeComponent;
|
||||
}
|
||||
void IEcsPool.SetRaw(int entityID, object dataRaw)
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!Has(entityID)) ThrowNotHaveComponent<T>(entityID);
|
||||
#endif
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!IsAlive) ThrowIsNotAlive(this);
|
||||
#endif
|
||||
return id;
|
||||
@ -51,7 +51,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!IsAlive) ThrowIsNotAlive(this);
|
||||
#endif
|
||||
return gen;
|
||||
@ -62,7 +62,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!IsAlive) ThrowIsNotAlive(this);
|
||||
#endif
|
||||
return EcsWorld.Worlds[world];
|
||||
@ -73,7 +73,7 @@ namespace DCFApixels.DragonECS
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get
|
||||
{
|
||||
#if (DEBUG && !DISABLE_DEBUG) || !DISABLE_DRAGONECS_ASSERT_CHEKS
|
||||
#if (DEBUG && !DISABLE_DEBUG) || ENABLE_DRAGONECS_ASSERT_CHEKS
|
||||
if (!IsAlive) ThrowIsNotAlive(this);
|
||||
#endif
|
||||
return world;
|
||||
|
Loading…
Reference in New Issue
Block a user