Exemple #1
0
 private bool ValidateTwitchConfiguration(SXLConfiguration config)
 {
     if (config.KeyExists("channel_name", "twitch") && config.KeyExists("client_id", "twitch") && config.KeyExists("client_secret", "twitch") && config.KeyExists("bot_name", "twitch") && config.KeyExists("bot_access_token", "twitch") && config.KeyExists("bot_refresh_token", "twitch"))
     {
         Debug.Log("Twitch Credentials Validated");
         return(true);
     }
     Debug.Log("Twitch Crecentials are not valid.");
     return(false);
 }
        public static void SetPlayerSettingsFromConfig()
        {
            SXLConfiguration config         = SXLFile.GetConfigFile();
            float            lowPop         = float.Parse(config.TryGet("p_lowpop", "player", "3.0"), System.Globalization.CultureInfo.InvariantCulture);
            float            highPop        = float.Parse(config.TryGet("p_highpop", "player", "3.5"), System.Globalization.CultureInfo.InvariantCulture);
            float            popOut         = float.Parse(config.TryGet("p_popout", "player", "1.0"), System.Globalization.CultureInfo.InvariantCulture);
            float            truckTightness = float.Parse(config.TryGet("p_trucks", "player", "1.0"), System.Globalization.CultureInfo.InvariantCulture);

            SetLowPop(lowPop);
            SetHighPop(highPop);
            SetPopOutMultiplier(popOut);
            SetTruckTightness(truckTightness);
        }
Exemple #3
0
 private void Start()
 {
     Application.runInBackground = true;
     _config = SXLFile.GetConfigFile();
 }