Esempio n. 1
0
        public void Initialise(GameLoopEventHandler onUpdate, GameLoopEventHandler onRender, IEntityDataProvider graphicsDataProvider)
        {
            BLT.Open();

            _update = onUpdate;
            _render = onRender;

            var config = $"window: size={Configuration.InitialWidth * TILE_SPACING}x{Configuration.InitialHeight * TILE_SPACING}, cellsize=4x4, title='{Configuration.WindowTitle}'";

            BLT.Set(config);

            BLT.Set("input: precise-mouse=false, filter=[keyboard,mouse+];");

            BLT.Set("text font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, spacing=2x3;");
            BLT.Set("textLarge font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, resize=16x24, resize-filter=nearest, spacing=4x6;");
            BLT.Set("textXLarge font: Images/Tileset/Andux_sleipnir_8x12_tf.png, codepage=437, size=8x12, resize=32x48, resize-filter=nearest, spacing=8x12;");


            _spriteManager = SetUpSpriteManager(graphicsDataProvider);

            List <IDataRogueControlRenderer> controlRenderers = BLTControlRenderer.DefaultControlRenderers;

            controlRenderers.AddRange(Configuration.AdditionalControlRenderers);

            Renderer = new BLTTilesUnifiedRenderer(controlRenderers, _spriteManager, Configuration);

            BLT.Refresh();
        }