public void TickDontApplyLuaNextLoadLevel()
        {
            FPSyncLuaPlayerOnLoadLevel sync = DialogueManager.Instance.GetComponent <FPSyncLuaPlayerOnLoadLevel>();

            if (sync != null)
            {
                sync.dontApplyLuaNextLoadLevel = true;
            }
        }
Esempio n. 2
0
        private void RestartGame()
        {
            Debug.Log("Restarting game");
            FPSyncLuaPlayerOnLoadLevel syncOnLoad = DialogueManager.Instance.GetComponent <FPSyncLuaPlayerOnLoadLevel>();

            if (syncOnLoad != null)
            {
                syncOnLoad.dontApplyLuaNextLoadLevel = true;
            }
            PersistentDataManager.LevelWillBeUnloaded();
            DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
            Application.LoadLevel(0);
        }