Esempio n. 1
0
        public virtual void Transform(RectTransformation transformation, VectorInt2 oldRoomSize)
        {
            IRotateableY rotateableObject = this as IRotateableY;

            if (rotateableObject != null)
            {
                float newRotation = rotateableObject.RotationY;
                if (transformation.MirrorX)
                {
                    newRotation = -newRotation;
                }
                newRotation -= transformation.QuadrantRotation * 90;
                rotateableObject.RotationY = newRotation;
            }
        }
Esempio n. 2
0
 public static void SetRotationYRadians(this IRotateableY obj, float value)
 {
     obj.RotationY = value * (float)(180.0 / Math.PI);
 }
Esempio n. 3
0
 public static float GetRotationYRadians(this IRotateableY obj)
 {
     return(obj.RotationY * (float)(Math.PI / 180.0));
 }