示例#1
0
        private static Item CreateHealthPotion(string name, int health)
        {
            var item = new HealthPotion
            {
                Id     = Guid.NewGuid(),
                Name   = name,
                Health = health
            };

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

            return(item);
        }