Esempio n. 1
0
        // Use this for initialization
        void Start()
        {
            if (instance != null)
            {
                Destroy(this);
            }
            instance = this;

            inputConfig = inputFile;

            parser = new KS_IniParser();

            if (!parser.DoesExist(gameConfig.i_configName))
            {
                PopulateWithDefaults();
                parser.Save(gameConfig.i_configName);
            }

            parser.Load(gameConfig.i_configName);
            CheckInputs();
            parser.Save(gameConfig.i_configName);

            for (int i = 0; i < UnityEngine.Input.GetJoystickNames().Length; i++)
            {
                Debug.Log("Joystick " + i + ": " + UnityEngine.Input.GetJoystickNames()[i]);
            }
        }
Esempio n. 2
0
        private void Start()
        {
            instance = this;

            settingsConfig = new KS_IniParser();

            if (!settingsConfig.DoesExist(gameConfig.SettingsConfigName))
            {
                Debug.Log("Doesnt exist");
                PopulateWithDefaults();
                settingsConfig.Save(gameConfig.SettingsConfigName);
                Debug.Log(gameConfig.SettingsConfigName + " created");
            }

            settingsConfig.Load(gameConfig.SettingsConfigName);
        }