Beispiel #1
0
    /// <summary>
    /// 保存玩家的配置
    /// </summary>
    public void Save()
    {
        var saver = new InputSaverXML(ConfigFilePath);

        Debug.Log("Save: " + ConfigFilePath);
        saver.Save(pcControlSchemes, joystickControlSchemes);
    }
Beispiel #2
0
    public void Save()
    {
        StringBuilder output = new StringBuilder();
        InputSaverXML saver  = new InputSaverXML(output);

        InputManager.Save(saver);

        PlayerPrefs.SetString("ControlsMenu.InputConfig", output.ToString());
    }
Beispiel #3
0
		public void Save()
		{
			string saveFolder = PathUtility.GetInputSaveFolder(m_exampleID);
			if(!System.IO.Directory.Exists(saveFolder))
				System.IO.Directory.CreateDirectory(saveFolder);

			InputSaverXML saver = new InputSaverXML(saveFolder + "/input_config.xml");
			InputManager.Save(saver);
		}
Beispiel #4
0
    public static void PlayerPrefsSave(string location)
    {
        StringBuilder output = new StringBuilder();
        InputSaverXML saver  = new InputSaverXML(output);

        InputManager.Save(saver);

        PlayerPrefs.SetString(location, output.ToString());
    }
        public static void CreateSnapshot(TeamUtility.IO.InputManager inputManager)
        {
            if (_snapshotFile == null)
            {
                _snapshotFile = Path.Combine(Application.temporaryCachePath, "input_config.xml");
            }

            InputSaverXML inputSaver = new InputSaverXML(_snapshotFile);

            inputSaver.Save(inputManager.inputConfigurations, inputManager.defaultConfiguration);
        }
        public static void CreateSnapshot(InputManager inputManager)
        {
            if (m_snapshotFile == null)
            {
                m_snapshotFile = Path.Combine(Application.temporaryCachePath, "input_config.xml");
            }

            InputSaverXML inputSaver = new InputSaverXML(m_snapshotFile);

            inputSaver.Save(inputManager.GetSaveData());
        }
Beispiel #7
0
        public static void CreateSnapshot(TPCEngine.InputManager inputManager)
        {
            if (_snapshotFile == null)
            {
                _snapshotFile = Path.Combine(Application.temporaryCachePath, "input_config.xml");
            }

            InputSaverXML inputSaver = new InputSaverXML(_snapshotFile);

            inputSaver.Save(inputManager.GetSaveParameters());
        }
Beispiel #8
0
        public void Save()
        {
            string saveFolder = PathUtility.GetInputSaveFolder(m_exampleID);

            if (!System.IO.Directory.Exists(saveFolder))
            {
                System.IO.Directory.CreateDirectory(saveFolder);
            }

            InputSaverXML saver = new InputSaverXML(saveFolder + "/input_config.xml");

            InputManager.Save(saver);
        }
        private void ExportInputConfigurations()
        {
            string file = EditorUtility.SaveFilePanel("Export input profile", "", "profile.xml", "xml");

            if (string.IsNullOrEmpty(file))
            {
                return;
            }

            InputSaverXML inputSaver = new InputSaverXML(file);

            inputSaver.Save(_inputManager.GetSaveParameters());
            if (file.StartsWith(Application.dataPath))
            {
                AssetDatabase.Refresh();
            }
        }