public static QuestDto[] InitQuests() { if (_qw == null) { // wait for quests file to download. while (!File.Exists(QuestsFile)) { } var result = File.ReadAllText(QuestsFile); _qw = JsonUtility.FromJson <QuestsWrapper>(result); } // ReSharper disable once SwitchStatementMissingSomeCases switch (SceneManagementUtil.ActiveScene) { case SceneManagementUtil.Scenes.Kabe: return(_qw.fil); case SceneManagementUtil.Scenes.HzMuhammed: return(_qw.hakem); case SceneManagementUtil.Scenes.Hamza: return(_qw.hamza); case SceneManagementUtil.Scenes.Hatice: return(_qw.kamer); case SceneManagementUtil.Scenes.Ebubekir: return(_qw.hicret); // fall-through default: throw new ArgumentOutOfRangeException(); } }
public bool Sync(QuestsWrapper qw) { var sync = Util.Sync(fil, qw.fil, "fil"); sync = sync && Util.Sync(hakem, qw.hakem, "hakem"); sync = sync && Util.Sync(hamza, qw.hamza, "hamza"); sync = sync && Util.Sync(kamer, qw.kamer, "kamer"); sync = sync && Util.Sync(hicret, qw.hicret, "hicret"); return(sync); }
public static void LoadQuestsFile() { if (_qw != null) { return; } // wait for quests file to download. var result = File.ReadAllText(QuestsFile); _qw = JsonUtility.FromJson <QuestsWrapper>(result); }