コード例 #1
0
        // Return true if successfully rotated.
        public bool RotateSelectedSprite(Sprite.RotateDirection dir)
        {
            Sprite sToRotate = CurrentSprite;

            if (sToRotate == null)
            {
                return(false);
            }

            int tileNewWidth  = sToRotate.TileHeight;
            int tileNewHeight = sToRotate.TileWidth;

            if (!sToRotate.Rotate(dir))
            {
                return(false);
            }

            MoveToCorrectSpriteType(sToRotate);
            return(true);
        }