public BlockInfo(string name, string[] textures = null, bool isTransparent = false, int price = 1, Dictionary <Type, object[]> components = null) { templistUv.Clear(); this.textures = textures; if (textures != null) { if (textures.Length != 6) { throw new System.ArgumentException("Size of textures array is not 6"); } templistUv.AddRange(To2(textures[0])); templistUv.AddRange(To2(textures[1])); templistUv.AddRange(To2(textures[2])); templistUv.AddRange(To2(textures[3])); templistUv.AddRange(To2(textures[4])); templistUv.AddRange(To2(textures[5])); } else { tempUvs = To2(name); templistUv.AddRange(tempUvs); templistUv.AddRange(tempUvs); templistUv.AddRange(tempUvs); templistUv.AddRange(tempUvs); templistUv.AddRange(tempUvs); templistUv.AddRange(tempUvs); } this.Name = name; this.uvs = templistUv.ToArray(); this.IsTransparent = isTransparent; this.mesh = mesh; Price = price; Block.Blocks.Add(this); if (components != null) { Components = components; } }
public MultimodelComponent(string corner, string side, string center) // г т + { this.corner = new DeloMesh(Game.Meshes[corner]); this.side = new DeloMesh(Game.Meshes[side]); this.center = new DeloMesh(Game.Meshes[center]); }