Exemple #1
0
 public VoxelMaterial(int atlasPosition, MaterialTyp materialId, Color color, int id, Drop[] drops)
 {
     AtlasPosition = atlasPosition;
     MaterialId    = materialId;
     Color         = color;
     Id            = id;
     Drops         = drops;
 }
Exemple #2
0
        protected internal VoxelMaterial Create(string name, MaterialTyp typ, Color c, Drop[] drops, bool fixedColor = false)
        {
            if (!_counterTyp.ContainsKey(typ))
            {
                _counterTyp[typ] = 0;
            }
            var vm = new VoxelMaterial(_counterTyp[typ]++, typ, fixedColor ? c : GetSimilarColor(c), VoxelMaterials.Values.Count, drops);

            VoxelMaterials[vm.Id]     = vm;
            VoxelMaterialByName[name] = vm;
            return(vm);
        }