Esempio n. 1
0
    public void SetCurrentPanelLine(int lineIndex, EPanelDirection dir)
    {
        PanelLineLerpAlpha = 0.0f;

        CurrentPanelLine  = lineIndex;
        CurrentFirstPanel = CurrentComicPage.PanelLineList[lineIndex].PanelList[0];
        CurrentLastPanel  = CurrentComicPage.PanelLineList[lineIndex].PanelList[CurrentComicPage.PanelLineList[lineIndex].PanelList.Count - 1];

        if (dir == EPanelDirection.Forward)
        {
            PanelSwitchOrigin = CurrentComicPage.PanelLineList[lineIndex - 1].PanelList[CurrentComicPage.PanelLineList[lineIndex - 1].PanelList.Count - 1].gameObject.transform.position;

            PanelSwitchOrigin.z = -1;
            PanelSwitchTarget   = CurrentFirstPanel.gameObject.transform.position - new Vector3(PanelOffset * 0.9f, 0.0f);
            PanelSwitchTarget.z = -1;
        }
        if (dir == EPanelDirection.Backward)
        {
            PanelSwitchOrigin = CurrentComicPage.PanelLineList[lineIndex + 1].PanelList[0].gameObject.transform.position;

            PanelSwitchOrigin.z = -1;
            PanelSwitchTarget   = CurrentLastPanel.gameObject.transform.position + new Vector3(PanelOffset * 0.9f, 0.0f);
            PanelSwitchTarget.z = -1;
        }
    }
Esempio n. 2
0
 public void EndOfLineReached(EPanelDirection dir)
 {
     PendingPanelDirection = dir;
     SetEndOfLineReached(true);
     ScrollVelocity = 0.0f;
 }