Exemplo n.º 1
0
        private void ReloadScene()
        {
            ClearScene();
            ChangeToStatus(RegularityStatus.InitScene);
            m_CurrentConfig = m_DiffMgr.GetDifficulty();
            for (int i = 0; i < m_CurrentConfig.OptionList.Count; ++i)
            {
                string     name      = m_CurrentConfig.OptionList[i].Name;
                bool       isVisable = m_CurrentConfig.OptionList[i].IsVisable;
                GameObject elem      = GameObject.Instantiate(m_ObjElementTemplate);
                elem.name = i.ToString();

                PilesAlphaElement dataElem = new PilesAlphaElement(elem, name, isVisable, m_strEmptyTextureName);
                ComponentTool.Attach(m_ObjElementRoot.transform, dataElem.m_ObjRoot.transform);
                m_ElementList.Add(dataElem);

                if (!isVisable)
                {
                    m_iCurrentOptionIndex = i - 1;
                }
            }
            m_Grid.Reposition();
            SetPlayerPos(0);

            OpenWindow();

            m_UIWindow.ResetAnswer(m_CurrentConfig.AnswerList);
            m_iCurrentJumpedIndex = 0;
            TriggerJumpToTarget(1);
        }
Exemplo n.º 2
0
        public void GuideStart()
        {
            for (int i = 0; i < 9; i++)
            {
                GameObject elem = GameObject.Instantiate(gameLogic.m_ObjElementTemplate);
                elem.name = i.ToString();
                string name      = i % 2 == 0 ? "Piles/Apple" : "Piles/Banana";
                bool   isVisable = i == 5 ? false : true;

                PilesAlphaElement dataElem = new PilesAlphaElement(elem, name, isVisable, gameLogic.m_strEmptyTextureName);
                ComponentTool.Attach(gameLogic.m_ObjElementRoot.transform, dataElem.m_ObjRoot.transform);
                m_ElementList.Add(dataElem);

                //if (!isVisable)
                {
                    //  m_iCurrentOptionIndex = i - 1;
                }
            }
            m_Grid.Reposition();
            SetPlayerPos(0);

            //OpenWindow();

            //m_UIWindow.ResetAnswer(m_CurrentConfig.AnswerList);
            m_iCurrentJumpedIndex = 0;
            TriggerJumpToTarget(1);
        }