mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-17 17:34:34 +08:00
Update ComponentTemplateBase.cs
This commit is contained in:
parent
d4e4ec7a66
commit
1c64d32831
@ -105,7 +105,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
public override void Apply(short worldID, int entityID)
|
public override void Apply(short worldID, int entityID)
|
||||||
{
|
{
|
||||||
EcsWorld.GetPoolInstance<EcsPool<T>>(worldID).TryAddOrGet(entityID) = component;
|
EcsPool<T>.Apply(ref component, entityID, worldID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public abstract class TagComponentTemplate<T> : ComponentTemplateBase<T>
|
public abstract class TagComponentTemplate<T> : ComponentTemplateBase<T>
|
||||||
@ -113,7 +113,7 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
public override void Apply(short worldID, int entityID)
|
public override void Apply(short worldID, int entityID)
|
||||||
{
|
{
|
||||||
EcsWorld.GetPoolInstance<EcsTagPool<T>>(worldID).Set(entityID, true);
|
EcsTagPool<T>.Apply(ref component, entityID, worldID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user