示例#1
0
        /**
         * <summary>Creates a new instance of the 'Camera: Split-screen' Action, set to overlay one camera over another</summary>
         * <param name = "underlayCamera">The camera to display full-screen underneath</param>
         * <param name = "overlayCamera">The camera to display on top</param>
         * <param name = "overlayRect">The portion of the screen that the overlay camera is drawn in</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCameraSplit CreateNew_Overlay(_Camera underlayCamera, _Camera overlayCamera, Rect overlayRect)
        {
            ActionCameraSplit newAction = (ActionCameraSplit)CreateInstance <ActionCameraSplit>();

            newAction.orientation = CameraSplitOrientation.Overlay;
            newAction.cam1        = underlayCamera;
            newAction.cam2        = overlayCamera;
            newAction.overlayRect = overlayRect;
            return(newAction);
        }
示例#2
0
        /**
         * <summary>Creates a new instance of the 'Camera: Split-screen' Action, set to arrange two cameras side by side</summary>
         * <param name = "leftCamera">The camera to on the left</param>
         * <param name = "rightCamera">The camera to display on the right</param>
         * <param name = "leftIsActive">If True, the left camera will be interactive. Otherwise, the right camera will be</param>
         * <param name = "leftCameraSpace">The proportion of the screen's width that the left camera takes up</param>
         * <param name = "rightCameraSpace">The proportion of the screen's width that the right camera takes up</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCameraSplit CreateNew_SideBySide(_Camera leftCamera, _Camera rightCamera, bool leftIsActive = true, float leftCameraSpace = 0.49f, float rightCameraSpace = 0.49f)
        {
            ActionCameraSplit newAction = (ActionCameraSplit)CreateInstance <ActionCameraSplit>();

            newAction.orientation   = CameraSplitOrientation.Vertical;
            newAction.cam1          = leftCamera;
            newAction.cam2          = rightCamera;
            newAction.mainIsTopLeft = leftIsActive;
            newAction.splitAmount1  = leftCameraSpace;
            newAction.splitAmount2  = rightCameraSpace;
            return(newAction);
        }
示例#3
0
        /**
         * <summary>Creates a new instance of the 'Camera: Split-screen' Action, set to arrange two cameras above and below each other</summary>
         * <param name = "topCamera">The camera to at the top</param>
         * <param name = "bottomCamera">The camera to display at the bottom</param>
         * <param name = "topIsActive">If True, the top camera will be interactive. Otherwise, the bottom camera will be</param>
         * <param name = "topCameraSpace">The proportion of the screen's height that the top camera takes up</param>
         * <param name = "bottomCameraSpace">The proportion of the screen's height that the bottom camera takes up</param>
         * <returns>The generated Action</returns>
         */
        public static ActionCameraSplit CreateNew_AboveAndBelow(_Camera topCamera, _Camera bottomCamera, bool topIsActive = true, float topCameraSpace = 0.49f, float bottomCameraSpace = 0.49f)
        {
            ActionCameraSplit newAction = (ActionCameraSplit)CreateInstance <ActionCameraSplit>();

            newAction.orientation   = CameraSplitOrientation.Horizontal;
            newAction.cam1          = topCamera;
            newAction.cam2          = bottomCamera;
            newAction.mainIsTopLeft = topIsActive;
            newAction.splitAmount1  = topCameraSpace;
            newAction.splitAmount2  = bottomCameraSpace;
            return(newAction);
        }