public ArrayList<Actor> getObjectsInRect(Rectangle rect, Class<? extends Actor> actorClass)
    {
        ArrayList<Actor> objectsAtPosition = new ArrayList<>();


        for (Actor actor : actorList)
        {
            if(actor.getClass().isAssignableFrom(actorClass))
                continue;

            if(actor.getRect().intersects(rect))
                objectsAtPosition.add(actor);
        }
        return objectsAtPosition;
    }