public void SensorActivated() { sensorsLeft--; if (sensorsLeft == 0 && !isExiting) { StartCoroutine(GoBack()); levelCamera.PlayWin(); isExiting = true; if (UserSettings.Instance.CurrentPlayer.Levels.ContainsKey(Application.loadedLevelName)) { UserSettings.Instance.CurrentPlayer.Levels.Remove(Application.loadedLevelName); } UserSettings.Instance.CurrentPlayer.Levels.Add(Application.loadedLevelName, new LevelData(Application.loadedLevelName, stepCount)); UserSettings.Instance.SavePlayerData(); } }