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()); }
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); } }