예제 #1
0
    public void InitSettings()
    {
        SettingsDb db = new SettingsDb();

        masterVolume      = Util.ToFloat(db.SelectSetting("master_volume"));
        sfxVolume         = Util.ToFloat(db.SelectSetting("sfx_volume"));
        musicVolume       = Util.ToFloat(db.SelectSetting("music_volume"));
        userName          = db.SelectSetting("username");
        mouseSensitivityX = Util.ToFloat(db.SelectSetting("mouse_sensitivity_x"));
        mouseSensitivityY = Util.ToFloat(db.SelectSetting("mouse_sensitivity_y"));
        player1Device     = (DeviceManager.Devices)Util.ToInt(db.SelectSetting("player1_device"));

        Sound.RefreshVolume();
    }
예제 #2
0
    public void InitSettings()
    {
        SettingsDb db = SettingsDb.Init();

        masterVolume      = Util.ToFloat(db.SelectSetting("master_volume"));
        sfxVolume         = Util.ToFloat(db.SelectSetting("sfx_volume"));
        musicVolume       = Util.ToFloat(db.SelectSetting("music_volume"));
        userName          = db.SelectSetting("username");
        mouseSensitivityX = Util.ToFloat(db.SelectSetting("mouse_sensitivity_x"));
        mouseSensitivityY = Util.ToFloat(db.SelectSetting("mouse_sensitivity_y"));
        db.Close();
        Sound.RefreshVolume();
    }