コード例 #1
0
        private void AddIndex(int value)
        {
            if (shiftDown)
            {
                value *= 4;
            }

            indexBuilding += value;

            if (indexBuilding < 0)
            {
                indexBuilding = PieceController.GetRowLength(compressedBuilding.pieceRow);
            }
            if (indexBuilding > PieceController.GetRowLength(compressedBuilding.pieceRow))
            {
                indexBuilding = 0;
            }

            SetSamplePiece();
        }
コード例 #2
0
        private void AddIndex(int value)
        {
            if (shiftDown)
            {
                value *= 4;
            }

            indexShadow += value;

            if (indexShadow < 0)
            {
                indexShadow = PieceController.GetRowLength(compressedBuilding.pieceRow);
            }
            if (indexShadow > PieceController.GetRowLength(compressedBuilding.pieceRow))
            {
                indexShadow = 0;
            }

            SetSampleShadow();
        }