package electrosphere.entity.types.hitbox;

import electrosphere.entity.Entity;
import electrosphere.entity.EntityDataStrings;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 *
 * @author amaterasu
 */
public class HitboxManager {
    
    CopyOnWriteArrayList<Entity> hitboxes = new CopyOnWriteArrayList();
    long idIncrementer = 0;
    
    public HitboxManager(){
        
    }
    
    public void registerHitbox(Entity hitbox){
        hitboxes.add(hitbox);
        idIncrementer++;
        hitbox.putData(EntityDataStrings.COLLISION_ENTITY_ID, idIncrementer);
    }
    
    public CopyOnWriteArrayList<Entity> getAllHitboxes(){
        return hitboxes;
    }
}
