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); }
private void ResetScene() { ClearScene(); ReLoadScene(); m_UIWindow.ResetAnswer(m_CurrentConfig.AnswerList); }