Getting somewhere

This commit is contained in:
Lani Aung
2021-10-10 17:15:45 -06:00
parent e09f00945b
commit 738b3c6d35
19 changed files with 594 additions and 88 deletions
+6
View File
@@ -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
View File
@@ -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;
}
}
}
}