mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +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;
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -331,6 +331,13 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
pool.TryAdd(entityID);
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -397,6 +397,11 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
pool.TryAddOrGet(entityID) = component;
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user