ECS FrameworkGroupOn this pageGroup Description: A record representing a group of entities in the ECS game systems. Class Object: Group Class. Inherits from: Object. count Type: Readonly Field. Description: The number of entities in the group. Signature: const count: integer first Type: Readonly Field. Description: The first entity in the group, or nil if the group is empty. Signature: const first: Entity each Type: Function. Description: Calls a function for each entity in the group. Signature: each: function(self: Group, func: function(Entity): boolean): boolean Parameters: ParameterTypeDescriptionfuncfunctionThe function to call for each entity.Returning true inside the function to stop iteration. Returns: Return TypeDescriptionbooleanFalse if all entities were processed, True if the iteration was interrupted. find Type: Function. Description: Finds the first entity in the group that satisfies a predicate function. Signature: find: function(self: Group, func: function(Entity): boolean): Entity Parameters: ParameterTypeDescriptionfuncfunctionThe predicate function to test each entity with. Returns: Return TypeDescriptionEntityThe first entity that satisfies the predicate, or nil if no entity does. watch Type: Function. Description: Watches the group for changes to its entities, calling a function whenever an entity is added or changed. Signature: watch: function(self: Group, func: function(Entity): boolean): Group Parameters: ParameterTypeDescriptionfuncfunctionThe function to call when an entity is added or changed. Returns true to stop watching. Returns: Return TypeDescriptionGroupThe same group, for method chaining.