public Part(int positionX, int positionY, PartDefinitions.Definition def = PartDefinitions.Definition.T_Detail, bool isRotatable = true) { this.PositionX = positionX; this.PositionY = positionY; if (def == PartDefinitions.Definition.ODetail) { isRotatable = false; } else { this._isRotatable = isRotatable; } this.Cubes = PartDefinitions.GetPartDefinition(def); ModelObjects = new T[Cubes.Length]; FindCentralCube(); SetPos(positionX, positionY); for (int i = 0; i < Cubes.Length; i++) { ModelObjects[i] = (T) new T().Create(Cubes[i]); } }
public Part(PartDefinitions.Definition def, bool isRotatable = true) : this(0, 0, def, isRotatable) { }