예제 #1
0
        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]);
            }
        }
예제 #2
0
 public Part(PartDefinitions.Definition def, bool isRotatable = true)
     : this(0, 0, def, isRotatable)
 {
 }