Math is hard
This commit is contained in:
+19
-7
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user