Пример #1
0
        protected virtual IEnumerator LockRefresh()
        {
            yield return(new WaitForSeconds(LockIntervalSeconds));

            var sceneInfo = SceneSelectedListener.CurrentValue.SceneInfo;
            var task      = EncounterLocker.LockEncounter(sceneInfo.User, sceneInfo.Encounter.Metadata);

            task.AddOnCompletedListener(EncounterRelocked);

            yield return(LockRefresh());
        }
Пример #2
0
 protected virtual void EnsureEncounterUnlocked(
     MenuSceneInfo sceneInfo,
     MenuEncounter menuEncounter,
     KeyValuePair <SaveType, EncounterMetadata> metadata)
 {
     if (menuEncounter.Metadata.ContainsKey(SaveType.Server))
     {
         var task = EncounterLocker.LockEncounter(sceneInfo.User, metadata.Value);
         task.AddOnCompletedListener((result) => EncounterLocked(result, sceneInfo, metadata));
     }
     else
     {
         StartWriter(sceneInfo, metadata);
     }
 }