void OnEnterMainMenu(MainUIState state) { m_mainMenuObject = GameObject.Instantiate(m_mainMenuPrefab) as GameObject; m_mainMenuObject.transform.SetParent(gameObject.transform); m_mainMenuObject.GetComponent <RectTransform>().sizeDelta = Vector2.zero; m_mainMenuObject.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; }
void OnEnterMainMenu(MainUIState state) { m_mainMenuObject = GameObject.Instantiate(m_mainMenuPrefab) as GameObject; m_mainMenuObject.transform.SetParent(gameObject.transform); m_mainMenuObject.GetComponent<RectTransform>().sizeDelta = Vector2.zero; m_mainMenuObject.GetComponent<RectTransform>().anchoredPosition = Vector2.zero; }
public void TransitionToState(MainUIState toState) { Debug.Log("Current State: " + toState.ToString()); m_prevState = m_currentState; if (m_UIStates [(int)m_prevState].m_end != null) m_UIStates [(int)m_prevState].m_end (m_prevState); m_currentState = toState; m_UIStates [(int)m_currentState].m_begin (m_currentState); }
public void TransitionToState(MainUIState toState) { Debug.Log("Current State: " + toState.ToString()); m_prevState = m_currentState; if (m_UIStates [(int)m_prevState].m_end != null) { m_UIStates [(int)m_prevState].m_end(m_prevState); } m_currentState = toState; m_UIStates [(int)m_currentState].m_begin(m_currentState); }
void OnExitFBLogin(MainUIState state) { Destroy(m_FBLoginObject); }
void OnEnterFBLogin(MainUIState state) { m_FBLoginObject = GameObject.Instantiate(m_FBLoginPrefab) as GameObject; m_FBLoginObject.transform.parent = gameObject.transform; m_FBLoginObject.transform.localScale = Vector3.one; }
void OnExitMainMenu(MainUIState state) { Destroy(m_mainMenuObject); }
public void UnRegisterForState(MainUIState registeredState, OnStateBegin begin, OnStateEnd end) { m_UIStates [(int)registeredState].m_begin -= begin; m_UIStates [(int)registeredState].m_end -= end; }