Exemplo n.º 1
0
        internal static void RotatePointsBy(CCPoint[] points, CCPoint pivotPoint, float degrees)
        {
            // first translate the degree into radians
            float radians = Constants.DegreesToRadians(degrees);

            for (int i = 0; i < points.Length; i++)
            {
                // "-radians" because "RotateByAngle" rotates counter-clockwise, while CocosSharp-Rotation is clockwise
                points[i] = CCPoint.RotateByAngle(points[i], pivotPoint, -radians);
            }
        }