/* * @brief 當實體從群組中移除 */ private void OnEntityRemoveHandler(IGroup <DemoEntity> group, DemoEntity entity) { component = null; Console.WriteLine($"demo entity: {entity} remove from group"); }
/* * @brief 當實體加入到群組中 */ private void OnEntityAddHandler(IGroup <DemoEntity> group, DemoEntity entity) { component = (ComponentA)entity.GetComponent(ComponentA.Id); Console.WriteLine($"demo entity: {entity} add to group"); }