package se.urmo.game.main;

import se.urmo.game.entities.Animated;

import java.util.ArrayList;
import java.util.List;

public class AnimationManager {
    private final List<Animated> animatedEntities = new ArrayList<>();

    public void register(Animated animated) {
        animatedEntities.add(animated);
    }

    public void unregister(Animated entity) {
        animatedEntities.remove(entity);
    }

    public void updateAll() {
        animatedEntities.forEach(Animated::updateAnimationTick);
    }

}
