package zero1hd.rhythmbullet.entity.coordinator;

import com.badlogic.gdx.utils.Pool.Poolable;

import zero1hd.rhythmbullet.entity.Entity;
import zero1hd.rhythmbullet.entity.EntityManager;

/**
 * Coordinator coordinates movement of an entity. Movement can range from basic pre-determined to more advanced (with condition based behavior).
 * @author Yunyang
 * 
 */
public class Coordinator implements Poolable {
	private CoordinatorFrame<? extends Coordinator> cf;
	protected EntityManager em;
	protected Entity entity;
	protected int scoreBonus;
	
	public void setup(EntityManager em, CoordinatorFrame<? extends Coordinator> cf) {
		this.em = em;
		this.cf = cf;
	}
	
	public void init(Entity entity) {
		this.entity = entity;
	}
	
	public void coordinate(float delta) {
	}
	
	public void clean() {
		cf.recycleCoordinator(this);
	}
	
	public void setEntity(Entity entity) {
		this.entity = entity;
	}
	
	@Override
	public void reset() {
		entity = null;
	}
	
	public int getScoreBonus() {
		return scoreBonus;
	}
}
