diff --git a/.gitmodules b/.gitmodules index 532d6f0..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "Svelto.Common"] - path = Svelto.Common - url = https://github.com/sebas77/Svelto.Common.git diff --git a/Svelto.ECS/EntitiesDB.cs b/Svelto.ECS/EntitiesDB.cs index db67eff..7619fd4 100644 --- a/Svelto.ECS/EntitiesDB.cs +++ b/Svelto.ECS/EntitiesDB.cs @@ -102,6 +102,26 @@ namespace Svelto.ECS.Internal casted.ExecuteOnEntityView(entityGID.entityID, action); } + public void ExecuteOnEntity(int id, ActionRef action) where T : IEntityStruct + { + ExecuteOnEntity(new EGID(id, ExclusiveGroup.StandardEntitiesGroup), action); + } + + public void ExecuteOnEntity(int id, int groupid, ActionRef action) where T : IEntityStruct + { + ExecuteOnEntity(new EGID(id, groupid), action); + } + + public void ExecuteOnEntity(int id, ref W value, ActionRef action) where T : IEntityStruct + { + ExecuteOnEntity(new EGID(id, ExclusiveGroup.StandardEntitiesGroup), ref value, action); + } + + public void ExecuteOnEntity(int id, int groupid, ref W value, ActionRef action) where T : IEntityStruct + { + ExecuteOnEntity(new EGID(id, groupid), ref value, action); + } + public void ExecuteOnEntities(int groupID, ActionRef action) where T : IEntityStruct { int count; diff --git a/Svelto.ECS/IEntitiesDB.cs b/Svelto.ECS/IEntitiesDB.cs index 359f33a..8efd084 100644 --- a/Svelto.ECS/IEntitiesDB.cs +++ b/Svelto.ECS/IEntitiesDB.cs @@ -39,6 +39,12 @@ namespace Svelto.ECS void ExecuteOnEntity(EGID egid, ref W value, ActionRef action) where T : IEntityStruct; void ExecuteOnEntity(EGID egid, ActionRef action) where T : IEntityStruct; + void ExecuteOnEntity(int id, ActionRef action) where T : IEntityStruct; + void ExecuteOnEntity(int id, int groupid, ActionRef action) where T : IEntityStruct; + + void ExecuteOnEntity(int id, ref W value, ActionRef action) where T : IEntityStruct; + void ExecuteOnEntity(int id, int groupid, ref W value, ActionRef action) where T : IEntityStruct; + void ExecuteOnEntities(int groupID, ActionRef action) where T : IEntityStruct; void ExecuteOnEntities(ActionRef action) where T : IEntityStruct;