public override void CalculateSteps() { tilemapChip = engine.tilemapChip; totalTiles = tilemapChip.total; gameChip = engine.gameChip; var colorMapChip = engine.chipManager.GetChip(ColorMapParser.chipName, false) as ColorChip; colors = colorMapChip == null ? engine.colorChip.colors : colorMapChip.colors; var spriteChip = engine.spriteChip; width = spriteChip.width * tilemapChip.columns; height = spriteChip.height * tilemapChip.rows; spriteSize = gameChip.SpriteSize(); var size = gameChip.SpriteSize(); totalPixels = size.x * size.y; loops = (int)Math.Ceiling((float)totalTiles / maxTilesPerLoop); base.CalculateSteps(); CalculateProcessingSteps(); }
public Canvas(int width, int height, GameChip gameChip = null) : base(width, height) { this.gameChip = gameChip; pattern = new TextureData(); pattern.SetPixel(0, 0, 0); stroke = new TextureData(); stroke.SetPixel(0, 0, 0); spriteSize = gameChip.SpriteSize(); }
public FlagColorExporter(string fileName, IEngineChips engineChips, ITextureFactory textureFactory) { fullFileName = fileName; // tilemapChip = engineChips.tilemapChip; totalFlags = engineChips.tilemapChip.totalFlags; gameChip = engineChips.gameChip; flagColorChip = engineChips.chipManager.GetChip(FlagColorParser.flagColorChipName, false) as ColorChip; tileSize = gameChip.SpriteSize(); this.textureFactory = textureFactory; }