package ecs.systems;

import ecs.components.Shape;
import ecs.core.System;
import res.display.FrameBuffer;

using res.graphics.Painter;

class DrawShapesSystem extends System {
	public function new() {
		super(Shape);

		updatable = false;
		renderable = true;
	}

	override function render(frameBuffer:FrameBuffer) {
		for (entity in entities) {
			final shape = entity.get(Shape);

			frameBuffer.shape(shape.type, shape.stroke, shape.fill);
		}
	}
}
