File tree Expand file tree Collapse file tree
src/main/java/com/github/elebras1/flecs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,6 +331,21 @@ public long getComponentId(Class<?> componentClass) {
331331 return this .componentRegistry .getComponentId (componentClass );
332332 }
333333
334+ public int count (long componentId ) {
335+ this .checkDestroyed ();
336+ return flecs_h .ecs_count_id (this .worldSeg , componentId );
337+ }
338+
339+ public int count (Entity entity ) {
340+ return count (entity .id ());
341+ }
342+
343+ public int count (Class <?> componentClass ) {
344+ this .checkDestroyed ();
345+ long componentId = this .componentRegistry .getComponentId (componentClass );
346+ return flecs_h .ecs_count_id (this .worldSeg , componentId );
347+ }
348+
334349 public void deleteWith (Class <?> componentClass ) {
335350 this .checkDestroyed ();
336351 long componentId = this .componentRegistry .getComponentId (componentClass );
You can’t perform that action at this time.
0 commit comments