package holo.bolt.entity;

import holo.bolt.render.RenderEntity;
import holo.bolt.world.World;

public abstract class EntityHostile extends Entity
{
	public Entity target;
	
	public EntityHostile(float[] position, float[] hitboxSize, World world)
	{
		super(position, hitboxSize, world);
	}
	
	public void onUpdate(int delta)
	{
		super.onUpdate(delta);
		if (!world.checkEntity(target))
		{
			target = world.getPlayer();
			updateAI(delta);
		}
		else
			updateAI(delta);
	}
	
	@Override
	public void setDead()
	{
		this.world.updateScore(this.getScoreValue());
		super.setDead();
	}

	public abstract String getTextureLoc();

	public abstract RenderEntity getRender();

	public abstract void onCollideWithEntity(Entity ent);
	
	public abstract void updateAI(int delta);
	
	public abstract float getAttackDamage();
	
	public abstract int getScoreValue();
}
