package generators;
import framework.component.ComponentSystem;
import framework.component.ParentComponent;
import framework.rendering.SpriteComponent;
import framework.spacial.PositionComponent;
public class BackgroundGenerator {
private static final String BACKGROUND_FILENAME = "res/img/Background.png";
public static void generateBackground(){
ParentComponent backgroundParent = new ParentComponent("Background");
ComponentSystem.getInstance().getRoot().addComponent(backgroundParent);
backgroundParent.addComponent(new PositionComponent(0,0));
SpriteComponent spriteComp = new SpriteComponent(BACKGROUND_FILENAME);
spriteComp.setAlwaysOnBottom();
backgroundParent.addComponent(spriteComp);
}
}