package zero1hd.rhythmbullet.entity;

import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.utils.Array;

import zero1hd.rhythmbullet.entity.ally.Laser;
import zero1hd.rhythmbullet.entity.enemies.Flake;
import zero1hd.rhythmbullet.entity.enemies.Pellet;
import zero1hd.rhythmbullet.entity.enemies.Shard;
import zero1hd.rhythmbullet.entity.enemies.VoidCircle;

public class EntityManager {
	private AssetManager assets;
	private Preferences prefs;
	private Stage stage;
	
	public Array<Entity> activeAllies;
	public Array<Entity> activeEnemies;
	
	public EntityFrame<VoidCircle> voidCircle;
	public EntityFrame<Pellet> pellet;
	public EntityFrame<Shard> shard;
	public EntityFrame<Flake> flake;
	
	public EntityFrame<Laser> laser;
	
	public EntityManager(AssetManager assetManager, Preferences preferences, Stage stage) {
		activeAllies = new Array<Entity>();
		activeEnemies = new Array<Entity>();
		this.assets = assetManager;
		this.prefs = preferences;
		this.stage = stage;
		
		setup();
	}
	
	private void setup() {
		voidCircle = new EntityFrame<>(this, VoidCircle.class);
		pellet = new EntityFrame<>(this, Pellet.class);
		shard = new EntityFrame<>(this, Shard.class);
		flake = new EntityFrame<>(this, Flake.class);
		laser = new EntityFrame<>(this, Laser.class);
		
	}
	
	public Stage getStage() {
		return stage;
	}
	
	public AssetManager getAssets() {
		return assets;
	}
	
	public Preferences getPrefs() {
		return prefs;
	}
}
