Exemple #1
0
        public ClientView(Resources resources, ClientModel appModel, UnityScene scene, Screens screens, Camera camera)
        {
            Resources = resources;
            AppModel  = appModel;
            Scene     = scene;
            Camera    = camera;
            Screens   = screens;

            CurrentState         = new MainMenuViewState();
            CurrentState.Context = this;
            CurrentState.OnEnter();
        }
Exemple #2
0
    private void OnViewStateChanged(EventContext context)
    {
        if (m_CurrViewState != null)
        {
            m_CurrViewState.OnExit();
        }

        var controller = context.sender as Controller;
        BaseViewState <T> viewState;

        if (m_ViewStateMap.TryGetValue(controller.selectedPage, out viewState))
        {
            viewState.OnEnter();
            m_CurrViewState = viewState;
        }
        else
        {
            m_CurrViewState = null;
        }
    }
Exemple #3
0
 public void AddViewState(string viewStateName, BaseViewState <T> viewState)
 {
     m_ViewStateMap.Add(viewStateName, viewState);
     viewState.OnInit(m_View);
 }