Math is hard

This commit is contained in:
Lani Aung
2021-11-20 20:43:36 -07:00
parent 4060f3c69d
commit 720b387dd3
20 changed files with 1010 additions and 63 deletions
+19 -7
View File
@@ -5,17 +5,29 @@ namespace fxl.codes.kisekae.Models
{
public class CelModel
{
public readonly int Fix;
public readonly string Image;
public readonly int Mark;
public readonly int ZIndex;
internal CelModel(CelConfig celConfig, Render render, int zIndex)
internal CelModel(CelConfig celConfig, int zIndex)
{
Mark = celConfig.Mark;
Fix = celConfig.Fix;
ZIndex = zIndex;
Image = Convert.ToBase64String(render.Image);
Image = Convert.ToBase64String(celConfig.Render.Image);
Height = celConfig.Cel.Height;
Width = celConfig.Cel.Width;
Opacity = (double)(255 - celConfig.Transparency) / 255;
foreach (var position in celConfig.Positions) InitialPositions[position.Set] = new CoordinateModel(position.X, position.Y);
Offset = new CoordinateModel(celConfig.Cel.OffsetX, celConfig.Cel.OffsetY);
}
public int Fix { get; set; }
public int Height { get; set; }
public string Image { get; set; }
public int Mark { get; set; }
public double Opacity { get; set; }
public int Width { get; set; }
public int ZIndex { get; set; }
public CoordinateModel[] InitialPositions { get; set; } = new CoordinateModel[10];
public CoordinateModel Offset { get; set; }
}
}