private void SetUpButtons() { if (m_previousButtonView != null) { m_previousButtonView.Detach(); } if (m_nextButtonView != null) { m_nextButtonView.Detach(); } m_previousButton = new ButtonModel(); m_nextButton = new ButtonModel(); m_previousButtonView = ButtonView.Attach <ButtonView>(PreviousButtonPrefabPath, m_previousButtonRoot); m_previousButtonView.SetModel <ButtonModel>(m_previousButton); m_nextButtonView = ButtonView.Attach <ButtonView>(NextButtonPrefabPath, m_nextButtonRoot); m_nextButtonView.SetModel <ButtonModel>(m_nextButton); m_previousButton.OnClicked += () => { OnClickPreviousButton(); }; m_nextButton.OnClicked += () => { OnClickNextButton(); }; // TODO : 演出を入れるならその場所に移動 m_previousButton.Appear(); m_previousButton.SkipAppearing(); m_nextButton.Appear(); m_nextButton.SkipAppearing(); }
private void SetUpButtons() { if (FormDatas.Count <= 1) { return; } if (m_previousButtonView != null) { m_previousButtonView.Detach(); } if (m_nextButtonView != null) { m_nextButtonView.Detach(); } m_previousButton = new ButtonModel(); m_nextButton = new ButtonModel(); m_previousButtonView = ButtonView.Attach <ButtonView>(PreviousButtonPrefabPath, m_previousButtonRoot); m_previousButtonView.SetModel <ButtonModel>(m_previousButton); m_nextButtonView = ButtonView.Attach <ButtonView>(NextButtonPrefabPath, m_nextButtonRoot); m_nextButtonView.SetModel <ButtonModel>(m_nextButton); m_previousButton.OnClicked += () => { OnClickPreviousButton(); }; m_nextButton.OnClicked += () => { OnClickNextButton(); }; UnityUtil.SetObjectEnabledOnce(m_decisionButton.gameObject, true); // TODO : 演出を入れるならその場所に移動 m_previousButton.Appear(); m_previousButton.SkipAppearing(); m_nextButton.Appear(); m_nextButton.SkipAppearing(); }