Пример #1
0
 void OpenWorkshopEntry(GameThumbnail gameThumbnail, WorkshopItem item)
 {
     SelectThumbnail(gameThumbnail, (rect) =>
     {
         gameDetail.FitTo(rect);
         gameDetail.OpenWorkshop(gameThumbnail.GetTexture(), item);
     });
 }
Пример #2
0
 void OpenSampleGame(GameThumbnail thumb, LocalSampleGames.GameInfo gameInfo)
 {
     SelectThumbnail(thumb, (rect) =>
     {
         gameDetail.FitTo(rect);
         string desc = "<b>Example game: " + gameInfo.title + "</b>\n" + gameInfo.description;
         gameDetail.OpenSpecial(desc, thumb.GetTexture(), playOpts =>
         {
             loadingScreen.ShowAndDo(() =>
             {
                 var gameOpts = new GameBuilderApplication.GameOptions {
                     playOptions = playOpts
                 };
                 loadingScreen.ShowAndDo(() => sceneController.RestartAndLoad(gameInfo.GetVoosFilePath(), gameOpts));
             });
         }, true);
     });
 }
Пример #3
0
    void ShowRoomDetails(GameThumbnail newThumbnail, string roomCode)
    {
        string detailCopy = $"<b>{newThumbnail.GetName()}</b> - {newThumbnail.GetPlayerCount()} player(s)";

        SelectThumbnail(newThumbnail, (rect) =>
        {
            gameDetail.FitTo(rect);
            gameDetail.OpenSpecial(detailCopy, newThumbnail.GetTexture(), playOpts =>
            {
                // TODO loading screen here?
                scenes.LoadMainSceneAsync(new GameBuilderApplication.GameOptions
                {
                    playOptions = new GameBuilderApplication.PlayOptions {
                        isMultiplayer = true
                    },
                    joinCode = roomCode
                });
            }, true);
        });
    }