Пример #1
0
 private bool onSceneStateButton(IglooUIEvents.SetStateButtonPressed evt)
 {
     SceneStateData.SceneState sceneState = evt.SceneState;
     if (sceneState == SceneStateData.SceneState.Edit)
     {
         setupEditState(evt.SplashScreen, evt.LayoutId);
     }
     return(false);
 }
    private bool onSceneStateButton(IglooUIEvents.SetStateButtonPressed evt)
    {
        SceneLayoutData activeSceneLayoutData = stateController.DataManager.LayoutManager.GetActiveSceneLayoutData();

        switch (evt.SceneState)
        {
        case SceneStateData.SceneState.Play:
            if (activeSceneLayoutData.LayoutId == stateController.ActiveIglooId)
            {
                stateController.TransitionFromEditOrPreviewToPlay(publishLayout: true);
            }
            else
            {
                stateController.ShowConfirmPublishPrompt();
            }
            break;

        case SceneStateData.SceneState.Edit:
            stateController.TransitionFromPreviewToEdit();
            break;
        }
        return(false);
    }