/// <summary> /// Download webservice configuration /// </summary> public void UpdateConfiguration(Action complete) { // Get the distant configuration ServiceConfiguration configWs = new ServiceConfiguration(); configWs.Request((config) => { this.Configuration = config; Logger.I("Configuration loaded and updated."); if (complete != null) complete(); }, (code, e) => { Logger.W("Configuration was not loaded!. "); // Try to use local this.Configuration = configWs.LastValidConfig; // No local? This is bad. Use default values. if (this.Configuration == null) { Logger.W("Using default (local and bad) values!. "); this.Configuration = new GameConfiguration(); } if (complete != null) complete(); }); }