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; } }
public static void SetRotationYRadians(this IRotateableY obj, float value) { obj.RotationY = value * (float)(180.0 / Math.PI); }
public static float GetRotationYRadians(this IRotateableY obj) { return(obj.RotationY * (float)(Math.PI / 180.0)); }