public void OnGameStoryboardWillPresentInitialCanvasController(StoryboardTransition transition)
    {
        var gameOverlayCanvasController =
            transition.DestinationCanvasController <FCGameOverlayCanvasController>();

        gameOverlayCanvasController.ConfigureWithPlayer(player);
    }
示例#2
0
    public void OnGameStoryboardWillPresentInitialCanvasController(StoryboardTransition transition)
    {
        // Get our canvas controller.
        GameWaitingCanvasController gameOverlayCanvasController =
            transition.DestinationCanvasController <GameWaitingCanvasController>();

        gameOverlayCanvasController.Configure(m_RaceManager);
    }
示例#3
0
    public void OnGameStoryboardWillPerformTransition(StoryboardTransition transition)
    {
        CanvasController destination = transition.DestinationCanvasController();

        if (destination is GameUICanvasController && transition.direction == StoryboardTransitionDirection.Downstream)
        {
            Debug.Log("Transitioning.");
        }
    }
    public override void PrepareForStoryboardTransition(StoryboardTransition transition)
    {
        CanvasController destination = transition.DestinationCanvasController();

        if (destination is LoadingCanvasController && transition.direction == StoryboardTransitionDirection.Downstream)
        {
            // We are presenting the loading screen. Configure it to present the offline game scene.
            LoadingCanvasController loadingCanvasController = (LoadingCanvasController)destination;
            loadingCanvasController.SceneToLoad = "MainMenu";
        }
    }
    public override void PrepareForStoryboardTransition(StoryboardTransition transition)
    {
        var destination = transition.DestinationCanvasController();

        if (destination is FCLoadingCanvasController &&
            transition.direction == StoryboardTransitionDirection.Downstream)
        {
            // We are presenting the loading screen. Configure it to present the Menu scene.
            var loadingCanvasController = (FCLoadingCanvasController)destination;
            loadingCanvasController.SceneToLoad = "FCMenuScene";
        }
    }
示例#6
0
 public void OnStoryboardWillPerformTransition(StoryboardTransition transition)
 {
     // Is the transition downstream (a presentation)?
     if (transition.direction == StoryboardTransitionDirection.Downstream)
     {
         // Is the destination a subclass of the control panel base canvas controller?
         var destinationCanvasController =
             transition.DestinationCanvasController <WSControlPanelBaseCanvasController>();
         if (destinationCanvasController != null)
         {
             // Initialize it with the cube to be controlled.
             destinationCanvasController.InitWithCube(cube);
         }
     }
 }
    public override void PrepareForStoryboardTransition(StoryboardTransition transition)
    {
        CanvasController destination = transition.DestinationCanvasController();

        if (destination is LoadingCanvasController && transition.direction == StoryboardTransitionDirection.Downstream)
        {
            // Get host button hook that set up network handler.
            HostGameButtonHook hostHook = (HostGameButtonHook)transition.invokedHook;

            // We are presenting the loading screen. Configure it to present the offline game scene.
            LoadingCanvasController loadingCanvasController = (LoadingCanvasController)destination;
            loadingCanvasController.SceneToLoad = "Offline";

            loadingCanvasController.NetworkHandler = hostHook.NetworkHandler;
            loadingCanvasController.handlerMode    = LoadingCanvasController.NetworkMode.SERVER;
        }
    }
    public override void PrepareForStoryboardTransition(StoryboardTransition transition)
    {
        var destination = transition.DestinationCanvasController();

        if (destination is LoadingCanvasController &&
            transition.direction == StoryboardTransitionDirection.Downstream)
        {
            // Get host button hook that set up network handler.
            JoinGameButtonHook joinHook = (JoinGameButtonHook)transition.invokedHook;

            // We are presenting the loading screen. Configure it to present the offline game scene.
            LoadingCanvasController loadingCanvasController = (LoadingCanvasController)destination;
            loadingCanvasController.SceneToLoad = "Offline";

            // Assign network handler properties and network mode.
            loadingCanvasController.NetworkHandler = joinHook.NetworkHandler;
            loadingCanvasController.handlerMode    = LoadingCanvasController.NetworkMode.CLIENT;
        }
    }
示例#9
0
    public void OnGameStoryboardWillPerformTransition(StoryboardTransition transition)
    {
        CanvasController destination = transition.DestinationCanvasController();

        if (transition.direction == StoryboardTransitionDirection.Downstream)
        {
            if (destination is GameUICanvasController)
            {
                GameUICanvasController gameUICanvasController = (GameUICanvasController)destination;

                // Configure UI with race manager.
                gameUICanvasController.Configure(m_RaceManager);
            }

            if (destination is GameEndCanvasController)
            {
                GameEndCanvasController gameEndCanvasController = (GameEndCanvasController)destination;

                // Configure UI with race manager.
                gameEndCanvasController.Configure(m_RaceManager);
            }
        }
    }