mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-21 17:35:56 +08:00
Merge branch 'dev' of github.com:DCFApixels/DragonECS into dev
This commit is contained in:
commit
9d7fcf3d71
@ -107,7 +107,7 @@ https://github.com/DCFApixels/DragonECS.git
|
||||
```
|
||||
|
||||
* ### В виде исходников
|
||||
Можно так же напрямую скопировать в проект исходники фреймворка.
|
||||
Можно так же напрямую скопировать исходники фреймворка в проект.
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user