示例#1
0
 /**
  * Sets the screen space rectangle used to display the story text.
  * The rectangle coordinates are in normalized screen space. e.g. x1 = 0 (left), y1 = 0 (top) x2 = 1 (right) y2 = 1 (bottom).
  * The origin is at the top left of the screen.
  * This method returns immediately but it queues an asynchronous command for later execution.
  * @param x1 Page rect left coordinate in normalized screen space coords [0..1]
  * @param y1 Page rect top coordinate in normalized screen space coords [0..1
  * @param x2 Page rect right coordinate in normalized screen space coords [0..1]
  * @param y2 Page rect bottom coordinate in normalized screen space coords [0..1]
  * @param pageLayout Layout mode for positioning page within the rect.
  */
 public static void SetPageRect(float x1, float y1, float x2, float y2, PageController.Layout pageLayout = PageController.Layout.FullSize)
 {
     PageController.ScreenRect screenRect = new PageController.ScreenRect();
     screenRect.x1 = x1;
     screenRect.y1 = y1;
     screenRect.x2 = x2;
     screenRect.y2 = y2;
     SetPageRect(screenRect, pageLayout);
 }
示例#2
0
 /**
  * Display story page at the bottom of the screen.
  * This method returns immediately but it queues an asynchronous command for later execution.
  * @param scaleX Scales the width of the Page [0..1]. 1 = full screen width.
  * @param scaleY Scales the height of the Page [0..1]. 1 = full screen height.
  * @param pageLayout Controls how the Page is positioned and sized based on the displayed content.
  */
 public static void SetPageBottom(float scaleX, float scaleY, PageController.Layout pageLayout)
 {
     PageController.ScreenRect screenRect = PageController.CalcScreenRect(new Vector2(scaleX, scaleY), PageController.PagePosition.Bottom);
     SetPageRect(screenRect, pageLayout);
 }
示例#3
0
        /**
         * Sets the screen space rectangle used to display the story text using a ScreenRect object.
         * This method returns immediately but it queues an asynchronous command for later execution.
         * @param screenRect A ScreenRect object which defines a rect in normalized screen space coordinates.
         */
        public static void SetPageRect(PageController.ScreenRect screenRect, PageController.Layout pageLayout = PageController.Layout.FullSize)
        {
            CommandQueue commandQueue = Game.GetInstance().commandQueue;

            commandQueue.AddCommand(new Command.SetPageRect(screenRect, pageLayout));
        }
示例#4
0
        /**
         * Sets the screen space rectangle used to display the story text using a Page object.
         * Page objects can be edited visually in the Unity editor which is useful for accurate placement.
         * The actual screen space rect used is based on both the Page bounds and the camera transform at the time the command is executed.
         * This method returns immediately but it queues an asynchronous command for later execution.
         * @param page A Page object which defines the screen rect to use when rendering story text.
         */
        public static void SetPage(Page page, PageController.Layout pageLayout = PageController.Layout.FullSize)
        {
            CommandQueue commandQueue = Game.GetInstance().commandQueue;

            commandQueue.AddCommand(new Command.SetPage(page, pageLayout));
        }
示例#5
0
 public SetPageRect(PageController.ScreenRect _screenRect, PageController.Layout _layout)
 {
     screenRect = _screenRect;
     layout     = _layout;
 }
示例#6
0
 public SetPage(Page _page, PageController.Layout _pageLayout)
 {
     page       = _page;
     pageLayout = _pageLayout;
 }