Example #1
0
        private static Item CreateItem(JsonFileGameData.Item itemData)
        {
            var item = new Item
            {
                Id   = itemData.Id,
                Name = itemData.Name
            };

            return(item);
        }
Example #2
0
        public static LegArmor CreateLegArmor(JsonFileGameData.Item itemData)
        {
            var item = new LegArmor
            {
                Id      = itemData.Id,
                Name    = itemData.Name,
                Defence = itemData.Defence
            };

            return(item);
        }
Example #3
0
        public static HealthPotion CreateHealthPotion(JsonFileGameData.Item itemData)
        {
            var item = new HealthPotion
            {
                Id     = itemData.Id,
                Name   = itemData.Name,
                Health = itemData.Health
            };

            return(item);
        }
Example #4
0
        public static Recipe CreateRecipe(JsonFileGameData.Item itemData)
        {
            var item = new Recipe
            {
                Id          = itemData.Id,
                Name        = itemData.Name,
                Ingredients = itemData.Ingredients,
                Results     = itemData.Results
            };

            return(item);
        }
Example #5
0
        public static Weapon CreateWeapon(JsonFileGameData.Item itemData)
        {
            var item = new Weapon
            {
                Id             = itemData.Id,
                Name           = itemData.Name,
                Attack         = itemData.Attack,
                ElementAttacks = itemData.ElementAttacks.Select(t => new ElementAttack {
                    Element = t.Element, Attack = t.Attack
                }).ToList()
            };

            return(item);
        }