mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
fix world id
This commit is contained in:
parent
1a798dffbe
commit
da86601442
@ -43,7 +43,7 @@ namespace DCFApixels.DragonECS
|
||||
{
|
||||
get { return UnityComponentConsts.BaseGroup; }
|
||||
}
|
||||
public sealed override void Apply(int worldID, int entityID)
|
||||
public sealed override void Apply(short worldID, int entityID)
|
||||
{
|
||||
EcsWorld.GetPoolInstance<EcsPool<UnityComponent<T>>>(worldID).TryAddOrGet(entityID) = component;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace DCFApixels.DragonECS
|
||||
public virtual void OnGizmos(Transform transform, GizmosMode mode) { }
|
||||
public virtual void OnValidate(UnityEngine.Object obj) { }
|
||||
|
||||
public abstract void Apply(int worldID, int entityID);
|
||||
public abstract void Apply(short worldID, int entityID);
|
||||
#endregion
|
||||
}
|
||||
[Serializable]
|
||||
@ -80,7 +80,7 @@ namespace DCFApixels.DragonECS
|
||||
public abstract class ComponentTemplate<T> : ComponentTemplateBase<T>
|
||||
where T : struct, IEcsComponent
|
||||
{
|
||||
public override void Apply(int worldID, int entityID)
|
||||
public override void Apply(short worldID, int entityID)
|
||||
{
|
||||
EcsWorld.GetPoolInstance<EcsPool<T>>(worldID).TryAddOrGet(entityID) = component;
|
||||
}
|
||||
@ -88,7 +88,7 @@ namespace DCFApixels.DragonECS
|
||||
public abstract class TagComponentTemplate<T> : ComponentTemplateBase<T>
|
||||
where T : struct, IEcsTagComponent
|
||||
{
|
||||
public override void Apply(int worldID, int entityID)
|
||||
public override void Apply(short worldID, int entityID)
|
||||
{
|
||||
EcsWorld.GetPoolInstance<EcsTagPool<T>>(worldID).Set(entityID, true);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void Apply(int worldID, int entityID)
|
||||
public void Apply(short worldID, int entityID)
|
||||
{
|
||||
foreach (var item in _components)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ namespace DCFApixels.DragonECS
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void Apply(int worldID, int entityID)
|
||||
public void Apply(short worldID, int entityID)
|
||||
{
|
||||
foreach (var item in _components)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user