public static void LoadOWScene(int mapID, bool shouldUpdate = false, Vector2?newPosition = null)
        {
            updatePositions = shouldUpdate;
            if (newPosition != null)
            {
                foreach (Character character in Party.Instance.characters)
                {
                    character.position = newPosition.Value;
                }
            }
            Party.Instance.currentMap = SceneManager.GetSceneByBuildIndex(mapID).name;

            // Salva o jogo se o autosave esta ativado
            if (SaveLoader.AutoSave)
            {
                SaveLoader.SaveGame();
            }

            SceneManager.sceneLoaded += OnMapLoad;
            SceneManager.sceneLoaded += UnlockMovement;
            SceneManager.LoadScene(mapID);
        }
Пример #2
0
        void Update()
        {
            if (Input.GetKeyDown(KeyCode.X))
            {
                Party.Instance.GiveExp(5000);
            }

            if (Input.GetKeyDown(KeyCode.C))
            {
                Party.Instance.GiveExp(500);
            }

            if (Input.GetKeyDown(KeyCode.E))
            {
                skill.GiveExp(500);
            }

            if (Input.GetKeyDown(KeyCode.R))
            {
                skill.GiveExp(50);
            }

            if (Input.GetKeyDown(KeyCode.N))
            {
                SaveLoader.NewGame();
            }

            if (Input.GetKeyDown(KeyCode.S))
            {
                SaveLoader.SaveGame();
            }

            if (Input.GetKeyDown(KeyCode.L))
            {
                SaveLoader.LoadGame();
            }
        }