예제 #1
0
        public void Awake()
        {
            instance = this;
            PluginConfiguration config = PluginConfiguration.CreateForType <PrefLoader>();

            config.load();


            //float.TryParse(config.GetValue("buoyancyMultiplicator", Preferences.buoyancyMultiplicator.ToString()), out Preferences.buoyancyMultiplicator);

            //config.TryGetFloat("buoyancyMultiplicator", ref Preferences.buoyancyMultiplicator);

            config.TryGetBool("showVolumeInfoInEditor", ref Preferences.showVolumeInfoInEditor);
            config.TryGetBool("showVolumeInfoInFlight", ref Preferences.showVolumeInfoInFlight);

            config.TryGetBool("showTemperatureInEditor", ref Preferences.showTemperatureInEditor);
            //config.TryGetBool("showTemperatureInFlight", ref Preferences.showTemperatureInFlight);

            config.TryGetBool("showAbsPressureInEditor", ref Preferences.showAbsPressureInEditor);
            config.TryGetBool("showAbsPressureInFlight", ref Preferences.showAbsPressureInFlight);

            config.TryGetBool("showBuoyancyInEditor", ref Preferences.showBuoyancyInEditor);
            config.TryGetBool("showBuoyancyInFlight", ref Preferences.showBuoyancyInFlight);

            config.TryGetBool("showVesselBuoyancyInEditor", ref Preferences.showVesselBuoyancyInEditor);
            config.TryGetBool("showVesselBuoyancyInFlight", ref Preferences.showVesselBuoyancyInFlight);

            config.TryGetBool("showVesselMassInEditor", ref Preferences.showVesselMassInEditor);
            config.TryGetBool("showVesselMassInFlight", ref Preferences.showVesselMassInFlight);

            config.TryGetBool("showGravPullInEditor", ref Preferences.showGravPullInEditor);
            config.TryGetBool("showGravPullInFlight", ref Preferences.showGravPullInFlight);

            config.TryGetUInt("debugLevel", ref Preferences.debugLevel);

            //config.TryGetBool("pressureDestruction", ref Preferences.pressureDestruction);
            //config.TryGetBool("alwaysControllable", ref Preferences.alwaysControllable);
        }