public Shield(ShieldData shieldData, string fullName) : base(fullName) { if (shieldData == null) throw new Exception("ShieldData cannot be null"); Data = shieldData; TextureData = ResourceManager.GetTextureData(Data.TextureName); }
public Shield(ShieldData shieldData, string fullName) : base(fullName) { if (shieldData == null) { throw new Exception("ShieldData cannot be null"); } Data = shieldData; TextureData = ResourceManager.GetTextureData(Data.TextureName); }
private static void populateShieldDataDictionary(ContentManager contentManager) { List <Dictionary <string, object> > shieldDataList = loadItemData(contentManager.RootDirectory + "/Items/Shields.txt"); foreach (var data in shieldDataList) { ShieldData shieldData = newObjectFromItemData <ShieldData>(data); shieldDataDictionary.Add(shieldData.Name, shieldData); Logger.Log("Loaded shield '" + shieldData.Name + "'"); } }
public static Shield GetNewShield(string name) { if (name == null) { return(null); } ShieldData shieldData = GetShieldData(name); if (shieldData == null) { return(null); } else { return(new Shield(shieldData, name)); } }
public Attributes(ShieldData shieldData) { generateAttributes(false, shieldData.BlacklistedAttributesToList(), shieldData.ForceAttributes); }