Getting somewhere
This commit is contained in:
@@ -52,5 +52,11 @@ namespace fxl.codes.kisekae.Models
|
||||
public Coordinate[] InitialPositions { get; } = new Coordinate[10];
|
||||
public string DefaultImage => ImageByPalette.ContainsKey(PaletteId) ? ImageByPalette[PaletteId] : null;
|
||||
public Coordinate Offset { get; set; }
|
||||
|
||||
public Coordinate PositionForSet(int set)
|
||||
{
|
||||
var current = InitialPositions[set];
|
||||
return current == null ? new Coordinate(0, 0) : new Coordinate(current.X + Offset.X, current.Y + Offset.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
-1
@@ -6,11 +6,26 @@ namespace fxl.codes.kisekae.Models
|
||||
public class PlaysetModel
|
||||
{
|
||||
public int[] CurrentPalettes = new int[10];
|
||||
public string Name { get; set; }
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
public Color BorderColor { get; set; }
|
||||
public Color BorderColor { get; set; } = Color.Black;
|
||||
|
||||
public List<PaletteModel> Palettes { get; } = new();
|
||||
public List<CelModel> Cels { get; } = new();
|
||||
|
||||
public bool[] EnabledSets
|
||||
{
|
||||
get
|
||||
{
|
||||
var enabled = new bool[10];
|
||||
foreach (var cel in Cels)
|
||||
for (var index = 0; index < cel.Sets.Length; index++)
|
||||
if (cel.Sets[index])
|
||||
enabled[index] = true;
|
||||
|
||||
return enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user