Ejemplo n.º 1
0
    private void MakeSampleGameThumbnail(LocalSampleGames.GameInfo gameInfo, int sortPriorityHint)
    {
        GameThumbnail thumb = Instantiate(gameThumbnailPrefab).GetComponent <GameThumbnail>();

        thumb.SetThumbnailUrl("file://" + gameInfo.GetThumbnailFilePath());
        thumb.SetGameSource(GameDetail.GameSource.Local);
        thumb.SetName(gameInfo.title);
        thumb.OnClick        = () => OpenSampleGame(thumb, gameInfo);
        thumb.GetWriteTime   = () => { return(System.DateTime.Today); };
        thumb.GetDescription = () => { return(gameInfo.description); };
        thumb.SetSortPriorityHint(sortPriorityHint);
        AddThumbnail(thumb);
    }
Ejemplo n.º 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);
     });
 }