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);
 }
示例#2
0
 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);
 }
示例#3
0
        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 + "'");
            }
        }
示例#4
0
        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));
            }
        }
示例#5
0
 public Attributes(ShieldData shieldData)
 {
     generateAttributes(false, shieldData.BlacklistedAttributesToList(), shieldData.ForceAttributes);
 }