public void FetchSavedGames(Action <UM_SavedGamesMetadataResult> callback)
        {
            var client = AN_Games.GetSnapshotsClient();

            client.Load((result) => {
                UM_SavedGamesMetadataResult loadResult;

                if (result.IsSucceeded)
                {
                    loadResult = new UM_SavedGamesMetadataResult();
                    foreach (var meta in result.Snapshots)
                    {
                        var an_meta = new UM_AndroidSavedGameMetadata(meta);
                        loadResult.AddMetadata(an_meta);
                    }
                }
                else
                {
                    loadResult = new UM_SavedGamesMetadataResult(result.Error);
                }


                callback.Invoke(loadResult);
            });
        }
Esempio n. 2
0
        public void FetchSavedGames(Action <UM_SavedGamesMetadataResult> callback)
        {
            var loadResult      = new UM_SavedGamesMetadataResult();
            var editorGamesList = LoadSavesList();

            foreach (EditorSavedGame game in editorGamesList.Saves)
            {
                loadResult.AddMetadata(game);
            }

            SA_Coroutine.WaitForSeconds(1.5f, () =>
            {
                callback.Invoke(loadResult);
            });
        }
Esempio n. 3
0
        public void FetchSavedGames(Action <UM_SavedGamesMetadataResult> callback)
        {
            ISN_GKLocalPlayer.FetchSavedGames((result) => {
                UM_SavedGamesMetadataResult loadResult;

                if (result.IsSucceeded)
                {
                    loadResult = new UM_SavedGamesMetadataResult();
                    foreach (var game in result.SavedGames)
                    {
                        var isn_meta = new UM_IOSSavedGameMetadata(game);
                        loadResult.AddMetadata(isn_meta);
                    }
                }
                else
                {
                    loadResult = new UM_SavedGamesMetadataResult(result.Error);
                }

                callback.Invoke(loadResult);
            });
        }