Example #1
0
        //マップを左回転
        public void RotateLeft()
        {
            var newMapOneMassList = new MapOneMass[mapData.MapSizeY, mapData.MapSizeX];

            for (int x = 0; x < newMapOneMassList.GetLength(0); x++)
            {
                for (int y = 0; y < newMapOneMassList.GetLength(1); y++)
                {
                    newMapOneMassList[x, y]          = mapData.List[mapData.MapSizeX - y - 1, x];
                    newMapOneMassList[x, y].LocalPos = new DXEX.Vect(x * mapData.MapChipSize, y * mapData.MapChipSize);
                    newMapOneMassList[x, y].RotateLeft();
                }
            }
            //新しいMadDataリストの方のポインタを保存
            mapData.List = newMapOneMassList;
        }