From cf9c27456da00ebee08a5dc3fe888b187b67b795 Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sat, 26 Jan 2019 22:11:01 -0600 Subject: [PATCH] convenience constructors added for skin serializable. --- RecrownedAthenaeum/Data/SkinData.cs | 30 +++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/RecrownedAthenaeum/Data/SkinData.cs b/RecrownedAthenaeum/Data/SkinData.cs index 2e30f64..283a619 100644 --- a/RecrownedAthenaeum/Data/SkinData.cs +++ b/RecrownedAthenaeum/Data/SkinData.cs @@ -1,4 +1,5 @@ -using RecrownedAthenaeum.UI.Skin.Definitions; +using Microsoft.Xna.Framework; +using RecrownedAthenaeum.UI.Skin.Definitions; namespace RecrownedAthenaeum.Data { @@ -66,7 +67,21 @@ namespace RecrownedAthenaeum.Data /// /// RGBA data of this color. /// - public int r, g, b, a; + public byte r, g, b, a; + + /// + /// Sets values for data. + /// + /// the name to be referenced by. + /// The color value represents. + public ColorData(string name, Color color) + { + this.name = name; + r = color.R; + g = color.G; + b = color.B; + a = color.A; + } } /// @@ -82,6 +97,17 @@ namespace RecrownedAthenaeum.Data /// The skin definition data. /// public ISkinDefinitionData skin; + + /// + /// Sets values for data. + /// + /// The name to be referenced by. + /// The skin data. + public DefinitionData(string name, ISkinDefinitionData skinDefinitionData) + { + this.name = name; + skin = skinDefinitionData; + } } } }