コード例 #1
0
        public MaterialListData ToData()
        {
            var data = new MaterialListData();

            data.List = _materials.Select(m => m.Value.ToData()).ToList();

            return(data);
        }
コード例 #2
0
        public BoctMaterialList(MaterialListData data) : this()
        {
            var materialDataList = data.List;

            if (materialDataList == null)
            {
                throw new BoctException("Material data is null.");
            }

            foreach (var materialData in materialDataList)
            {
                _materials[materialData.LUID] = new BoctMaterial(materialData);
            }
        }