Merge branch 'dev' of github.com:DCFApixels/DragonECS into dev

This commit is contained in:
Mikhail 2026-04-01 15:10:17 +08:00
commit 9d7fcf3d71
4 changed files with 18 additions and 1 deletions

View File

@ -107,7 +107,7 @@ https://github.com/DCFApixels/DragonECS.git
```
* ### В виде исходников
Можно так же напрямую скопировать в проект исходники фреймворка.
Можно так же напрямую скопировать исходники фреймворка в проект.

View File

@ -390,6 +390,11 @@ namespace DCFApixels.DragonECS
{
pool.TryAddOrGet(entityID) = component;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Apply(short worldID, int entityID)
{
return ref EcsWorld.GetPoolInstance<EcsPool<T>>(worldID).TryAddOrGet(entityID);
}
#endregion
}

View File

@ -331,6 +331,13 @@ namespace DCFApixels.DragonECS
{
pool.TryAdd(entityID);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Apply(short worldID, int entityID)
{
var pool = EcsWorld.GetPoolInstance<EcsTagPool<T>>(worldID);
pool.TryAdd(entityID);
return ref pool._fakeComponent;
}
#endregion
}

View File

@ -397,6 +397,11 @@ namespace DCFApixels.DragonECS
{
pool.TryAddOrGet(entityID) = component;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Apply(short worldID, int entityID)
{
return ref EcsWorld.GetPoolInstance<EcsValuePool<T>>(worldID).TryAddOrGet(entityID);
}
#endregion
}