// Path: core/src/net/mostlyoriginal/game/G.java
// public class G {
//     public static int ZOOM = 3;
// 
//     public static final int CANVAS_WIDTH = 160 * ZOOM;
//     public static final int CANVAS_HEIGHT = 266 * ZOOM;
//     public static String version = "0.1.6";
// 
//     public static final int MAX_COMPLETION = 20;
// }
// 
// Path: core/src/net/mostlyoriginal/game/component/ui/Bar.java
// public class Bar extends Label {
// 
//     public int value;
//     public String animationIdEmpty;
//     public int valueEmpty;
//     public String animationId;
// 
//     public Bar() {}
//     public Bar(String text, String animationId, int value, String animationIdEmpty, int valueEmpty) {
//         super(text);
//         this.animationId = animationId;
//         this.value = value;
//         this.animationIdEmpty = animationIdEmpty;
//         this.valueEmpty = valueEmpty;
//     }
// }
// 
// Path: core/src/net/mostlyoriginal/game/manager/FontManager.java
// public class FontManager extends Manager {
// 
//     public BitmapFont font;
//     public BitmapFont bigFont;
// 
//     @Override
//     protected void initialize() {
//         super.initialize();
//         font = new BitmapFont(Gdx.files.internal("5x5.fnt"), (TextureRegion)null, false);
//         font.setColor(1f, 1f, 1f, 1f);
//         bigFont = new BitmapFont(Gdx.files.internal("5x5.fnt"), false);
//         bigFont.setColor(1f, 1f, 1f, 1f);
//         bigFont.getData().scale(1f);
//     }
// }


import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.annotations.Wire;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import net.mostlyoriginal.api.component.basic.Pos;
import net.mostlyoriginal.api.component.graphics.Invisible;
import net.mostlyoriginal.api.component.graphics.Tint;
import net.mostlyoriginal.api.manager.AbstractAssetSystem;
import net.mostlyoriginal.api.system.camera.CameraSystem;
import net.mostlyoriginal.api.system.delegate.DeferredEntityProcessingSystem;
import net.mostlyoriginal.api.system.delegate.EntityProcessPrincipal;
import net.mostlyoriginal.game.G;
import net.mostlyoriginal.game.component.ui.Bar;
import net.mostlyoriginal.game.manager.FontManager;
package net.mostlyoriginal.game.system.render;


/**
 * Render and progress animations.
 *
 * @author Daan van Yperen
 * @see net.mostlyoriginal.api.component.graphics.Anim
 */
@Wire
public class BarRenderSystem extends DeferredEntityProcessingSystem {

    private ComponentMapper<Pos> pm;
    protected ComponentMapper<Tint> mTint;
    private ComponentMapper<Bar> mBar;

    private AbstractAssetSystem abstractAssetSystem;
    private CameraSystem cameraSystem;
    private FontManager fontManager;

    private SpriteBatch batch;
    private GlyphLayout glyphLayout;

    @Override
    protected void initialize() {
        super.initialize();
        glyphLayout = new GlyphLayout();
    }

    public BarRenderSystem(EntityProcessPrincipal principal) {
        super(Aspect.all(Pos.class, Bar.class).exclude(Invisible.class), principal);
        batch  = new SpriteBatch(1000);
    }

    @Override
// Path: core/src/net/mostlyoriginal/game/G.java
// public class G {
//     public static int ZOOM = 3;
// 
//     public static final int CANVAS_WIDTH = 160 * ZOOM;
//     public static final int CANVAS_HEIGHT = 266 * ZOOM;
//     public static String version = "0.1.6";
// 
//     public static final int MAX_COMPLETION = 20;
// }
// 
// Path: core/src/net/mostlyoriginal/game/component/ui/Bar.java
// public class Bar extends Label {
// 
//     public int value;
//     public String animationIdEmpty;
//     public int valueEmpty;
//     public String animationId;
// 
//     public Bar() {}
//     public Bar(String text, String animationId, int value, String animationIdEmpty, int valueEmpty) {
//         super(text);
//         this.animationId = animationId;
//         this.value = value;
//         this.animationIdEmpty = animationIdEmpty;
//         this.valueEmpty = valueEmpty;
//     }
// }
// 
// Path: core/src/net/mostlyoriginal/game/manager/FontManager.java
// public class FontManager extends Manager {
// 
//     public BitmapFont font;
//     public BitmapFont bigFont;
// 
//     @Override
//     protected void initialize() {
//         super.initialize();
//         font = new BitmapFont(Gdx.files.internal("5x5.fnt"), (TextureRegion)null, false);
//         font.setColor(1f, 1f, 1f, 1f);
//         bigFont = new BitmapFont(Gdx.files.internal("5x5.fnt"), false);
//         bigFont.setColor(1f, 1f, 1f, 1f);
//         bigFont.getData().scale(1f);
//     }
// }


// Path: core/src/net/mostlyoriginal/game/system/render/BarRenderSystem.java
import com.artemis.Aspect;
import com.artemis.ComponentMapper;
import com.artemis.annotations.Wire;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import net.mostlyoriginal.api.component.basic.Pos;
import net.mostlyoriginal.api.component.graphics.Invisible;
import net.mostlyoriginal.api.component.graphics.Tint;
import net.mostlyoriginal.api.manager.AbstractAssetSystem;
import net.mostlyoriginal.api.system.camera.CameraSystem;
import net.mostlyoriginal.api.system.delegate.DeferredEntityProcessingSystem;
import net.mostlyoriginal.api.system.delegate.EntityProcessPrincipal;
import net.mostlyoriginal.game.G;
import net.mostlyoriginal.game.component.ui.Bar;
import net.mostlyoriginal.game.manager.FontManager;

package net.mostlyoriginal.game.system.render;


/**
 * Render and progress animations.
 *
 * @author Daan van Yperen
 * @see net.mostlyoriginal.api.component.graphics.Anim
 */
@Wire
public class BarRenderSystem extends DeferredEntityProcessingSystem {

    private ComponentMapper<Pos> pm;
    protected ComponentMapper<Tint> mTint;
    private ComponentMapper<Bar> mBar;

    private AbstractAssetSystem abstractAssetSystem;
    private CameraSystem cameraSystem;
    private FontManager fontManager;

    private SpriteBatch batch;
    private GlyphLayout glyphLayout;

    @Override
    protected void initialize() {
        super.initialize();
        glyphLayout = new GlyphLayout();
    }

    public BarRenderSystem(EntityProcessPrincipal principal) {
        super(Aspect.all(Pos.class, Bar.class).exclude(Invisible.class), principal);
        batch  = new SpriteBatch(1000);
    }

    @Override
    protected void begin() {