示例#1
0
    IEnumerator AnimInNewPanel(PollockPanel curPanel, string swipeDirection)
    {
        yield return(new WaitForSeconds(0.4f));

        _CurPanel = Instantiate(curPanel, PanelContainer.transform) as PollockPanel;
        _CurPanel.Init(swipeDirection);
    }
示例#2
0
    void InitPollockPanel(int newPanel = 0)
    {
        string swipeDirection = "left";

        //if we have a current panel, have to move out and destroy
        if (_CurPanel != null)
        {
            if (newPanel > _CurPanelInt)
            {
                _CurPanel.Destroy("left");
            }
            else
            {
                _CurPanel.Destroy("right");
                swipeDirection = "right";
            }
        }

        _CurPanelInt = newPanel;
        PollockPanel curPanel = PollockPrefabs[_CurPanelInt];

        StartCoroutine(AnimInNewPanel(curPanel, swipeDirection));

        //_CurPanel = Instantiate(curPanel, PanelContainer.transform) as PollockPanel;
        //_CurPanel.Init();

        //PollockPanel1 pollockPanel = Instantiate(Panel1Prefab, PanelContainer.transform) as PollockPanel1;
        //pollockPanel.Init();
    }
示例#3
0
 void ClearPanels()
 {
     foreach (Transform child in PanelContainer.transform)
     {
         GameObject.Destroy(child.gameObject);
     }
     _CurPanel = null;
 }