The below example is creation of character Entity. My problem is do I always need to call these engine.createComponent(...class) to create a component? Or should I wrap these to another class that handles the creation of entities?
PooledEngine engine = new PooledEngine(); ... CharacterComponent character = engine.createComponent(CharacterComponent.class); TextureComponent texture = engine.createComponent(TextureComponent.class); SizeComponent size = engine.createComponent(SizeComponent.class); TransformComponent transform = engine.createComponent(TransformComponent.class); PhysicsComponent physics = engine.createComponent(PhysicsComponent.class); Entity entity = engine.createEntity(); entity.flag = Constants.CHARACTER; entity.add(character); entity.add(texture); entity.add(size); entity.add(transform); entity.add(physics); engine.addEntity(entity);