package zero1hd.rhythmbullet.entity;

import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.utils.Array;

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

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