mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
fxi tag pool checks/add ThrowNullComponent/add EcsRefPool to readme
This commit is contained in:
parent
47d8e100a1
commit
b1192d32d9
@ -125,6 +125,7 @@ https://github.com/DCFApixels/DragonECS.git
|
||||
* [Графы](https://github.com/DCFApixels/DragonECS-Graphs)
|
||||
* Утилиты:
|
||||
* [Упрощенный синтаксис](https://gist.github.com/DCFApixels/d7bfbfb8cb70d141deff00be24f28ff0)
|
||||
* [EcsRefPool](https://gist.github.com/DCFApixels/73e392ccabdd98b3d4a517017d8a3f22)
|
||||
* [Таймеры](https://gist.github.com/DCFApixels/71a416275660c465ece76242290400df)
|
||||
* [Однокадровые компоненты](https://gist.github.com/DCFApixels/46d512dbcf96c115b94c3af502461f60)
|
||||
* [Шаблоны кода IDE](https://gist.github.com/ctzcs/0ba948b0e53aa41fe1c87796a401660b) и [для Unity](https://gist.github.com/ctzcs/d4c7730cf6cd984fe6f9e0e3f108a0f1)
|
||||
|
||||
@ -62,7 +62,12 @@ namespace DCFApixels.DragonECS.PoolsCore
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void ThrowNullListener()
|
||||
{
|
||||
throw new ArgumentNullException("listener is null");
|
||||
throw new ArgumentNullException("Listener is null");
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void ThrowNullComponent()
|
||||
{
|
||||
throw new ArgumentNullException("Component is null");
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void ThrowPoolLocked()
|
||||
|
||||
@ -116,6 +116,7 @@ namespace DCFApixels.DragonECS
|
||||
public void Add(int entityID)
|
||||
{
|
||||
#if DEBUG
|
||||
if (entityID == EcsConsts.NULL_ENTITY_ID) { EcsPoolThrowHelper.ThrowEntityIsNotAlive(_world, entityID); }
|
||||
if (_world.IsUsed(entityID) == false) { EcsPoolThrowHelper.ThrowEntityIsNotAlive(_world, entityID); }
|
||||
if (Has(entityID)) { EcsPoolThrowHelper.ThrowAlreadyHasComponent<T>(entityID); }
|
||||
if (_isLocked) { EcsPoolThrowHelper.ThrowPoolLocked(); }
|
||||
@ -144,6 +145,7 @@ namespace DCFApixels.DragonECS
|
||||
public void Del(int entityID)
|
||||
{
|
||||
#if DEBUG
|
||||
if (entityID == EcsConsts.NULL_ENTITY_ID) { EcsPoolThrowHelper.ThrowEntityIsNotAlive(_world, entityID); }
|
||||
if (!Has(entityID)) { EcsPoolThrowHelper.ThrowNotHaveComponent<T>(entityID); }
|
||||
if (_isLocked) { EcsPoolThrowHelper.ThrowPoolLocked(); }
|
||||
#elif DRAGONECS_STABILITY_MODE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user