private async Task StartMetaUpdateLevel()
        {
            try
            {
                var meta = await MainGame.Inst.Backend.QueryUserLevelMeta(MainGame.Inst.Profile, _blueprint.CustomMeta_LevelID);

                if (meta == null)
                {
                    MonoSAMGame.CurrentInst.DispatchBeginInvoke(() =>
                    {
                        HUD.ShowToast("SCCMLPD::CUF(MULTI)", L10N.T(L10NImpl.STR_SCCM_DOWNLOADFAILED), 40, FlatColors.Flamingo, FlatColors.Foreground, 3f);
                        MonoSAMGame.CurrentInst.DispatchBeginInvoke(OnDownloadFailed);
                    });
                    return;
                }

                _meta = meta;
                MonoSAMGame.CurrentInst.DispatchBeginInvoke(OnCacheUpdateSuccess);
            }
            catch (Exception e)
            {
                MonoSAMGame.CurrentInst.DispatchBeginInvoke(() =>
                {
                    HUD.ShowToast("SCCMLPD::CUF(MULTI)", L10N.T(L10NImpl.STR_SCCM_DOWNLOADFAILED), 40, FlatColors.Flamingo, FlatColors.Foreground, 3f);
                });

                MonoSAMGame.CurrentInst.DispatchBeginInvoke(OnDownloadFailed);

                SAMLog.Error("SCCMLPD:CacheUpdateException", e);
            }
        }
 private CustomLevelCompletionResult(bool e, bool pb, bool fc, bool wr, int g, SCCMLevelMeta m)
 {
     IsError        = e;
     IsPersonalBest = pb;
     IsFirstClear   = fc;
     IsWorldRecord  = wr;
     ScoreGain      = g;
     Metadata       = m;
 }
        public SCCMLevelPreviewDialog(SCCMLevelMeta meta, LevelBlueprint lvl = null)
        {
            _meta      = meta;
            _blueprint = lvl;

            RelativePosition = FPoint.Zero;
            Size             = new FSize(WIDTH, HEIGHT);
            Alignment        = HUDAlignment.CENTER;
            Background       = FlatColors.BackgroundHUD;
        }
示例#4
0
        public int TimeDisplayMode = 1;         // (PB, WR, CURR)

        public HUDSCCMScorePanel_Won(LevelBlueprint lvl, SCCMLevelMeta meta, FractionDifficulty d, int scoreGain, int time)
        {
            _level             = lvl;
            LevelMeta          = meta;
            LevelDifficulty    = d;
            SelectedDifficulty = d;
            _scoreGain         = scoreGain;
            PersonalTimes      = MainGame.Inst.Profile.GetCustomLevelTimes(meta.OnlineID);
            LevelTime          = time;

            RelativePosition = FPoint.Zero;
            Size             = new FSize(WIDTH, HEIGHT);
            Alignment        = HUDAlignment.CENTER;
            Background       = FlatColors.BackgroundHUD;
        }
 public static CustomLevelCompletionResult Parse(QueryResultUpdateUserLevelCompleted r)
 {
     return(new CustomLevelCompletionResult(false, r.inserted, r.firstclear, r.highscore, r.scoregain, SCCMLevelMeta.Parse(r.meta)));
 }
示例#6
0
 public void SetMeta(SCCMLevelMeta m)
 {
     _meta = m;
 }
示例#7
0
 public SCCMListElementOnlinePlayable(SCCMLevelMeta m)
 {
     _meta        = m;
     PersonalBest = MainGame.Inst.Profile.GetCustomLevelPB(m.OnlineID);
 }