void Update() { if (updateRequest) { Debug.Log("Update request"); dl.LoadScores(); updateRequest = false; fetchScores = true; submit.SetActive(false); } if (fetchScores) { Debug.Log("fetchScores"); scoreList = dl.ToListHighToLow(); if (scoreList.Count != oldCount) { Debug.Log("score fetched"); populateBoard(); fetchScores = false; if (isInTop()) { submit.SetActive(true); } oldCount = scoreList.Count(); } } }
public void StartGame() { scoreText.gameObject.SetActive(true); player = GameObject.FindWithTag("Player").gameObject; player.GetComponent <Movement> ().isStarted = true; spawner = GameObject.FindWithTag("Spawner").gameObject; spawner.GetComponent <Spawner> ().isStarted = true; // check the internet connection StartCoroutine(checkInternetConnectionWithWWW()); leaderboard.LoadScores(); wasSaved = false; isStarted = true; }
public void validateName() { toggleSubmitFalse(); checkName = nameEnter.text; outputText.text = "Processing..."; if (checkName.Equals("")) { outputText.text = "Please Enter a Name"; toggleSubmitTrue(); } else if (checkName.Length > 18) { outputText.text = "Too Many Characters"; toggleSubmitTrue(); } else if (checkName.Equals(PlayerPrefs.GetString("YourName", "No Name"))) { outputText.text = "Please Enter a Different Name"; toggleSubmitTrue(); } else { int AsciiCheck = 0; for (int i = 0; i < checkName.Length; i++) { if (checkName[i] < ' ' || (checkName[i] > ' ' && checkName[i] < '0') || (checkName[i] > '9' && checkName[i] < 'A') || checkName[i] > 'z' || (checkName[i] > 'Z' && checkName[i] < '_') || (checkName[i] > '_' && checkName[i] < 'a'))//insert ascii chart { AsciiCheck = 1; } } if (AsciiCheck == 1) { outputText.text = "Contains Invalid Characters"; toggleSubmitTrue(); } else { outputText.text = "Loading..."; GetScoreOrRefresh = 1; dl.LoadScores(); } } }
void Start() { print("Starting LeaderBoard"); loadingIcon.SetActive(true); loadingIcon.GetComponent <Text>().text = "Connecting..."; this.dl = dreamloLeaderBoard.GetSceneDreamloLeaderboard(); dl.LoadScores(); StartCoroutine(ShowScores()); }
public void OpenLeaderboard() { SoundManager.PlaySound(selectSound); menuState = MenuState.Leaderboard; buttons.SetActive(false); board.SetActive(true); instructions.SetActive(false); leaderBoard.LoadScores(); }
public void RefreshLeaderboard() { dreamloRef.highScores = ""; dreamloRef.LoadScores(); for (int i = 0; i < statobs.Count; DestroyImmediate(statobs[i].gameObject), i++) { ; } statobs.Clear(); StartCoroutine(DoLeaderboardUI()); }
public override void Enable() { base.Enable(); loadingText.text = "Loading..."; loadingText.gameObject.SetActive(true); if (lbMgn != null) { lbMgn.LoadScores(SocresLoadCallback); } else { loadingText.text = "Can't Load Leabderboard"; } }
void Start() { this._MyLeaderBoard = dreamloLeaderBoard.GetSceneDreamloLeaderboard(); _MyLeaderBoard.LoadScores(); if (Application.loadedLevel == 5) { gs = GameState.leaderboard; print("pull"); } if (Application.loadedLevel == 2) { gs = GameState.waiting; } }
// Use this for initialization void Start() { klub.value = PlayerPrefs.GetInt("sidsteKlub"); mb = GameObject.Find("musicbox").GetComponent <Musicbox>(); // get the reference here... this.dl = dreamloLeaderBoard.GetSceneDreamloLeaderboard(); // get the other reference here this.pc = dreamloPromoCode.GetSceneDreamloPromoCode(); calculateMinMax(); // calc for different screen sizes dl.LoadScores(); StartCoroutine(DumbHack()); }
public void Reset() { Score = 0; highscorePlayerPrefsKey = "highscore_" + SceneManager.GetActiveScene().buildIndex; if (!PlayerPrefs.HasKey(highscorePlayerPrefsKey)) { PlayerPrefs.SetInt(highscorePlayerPrefsKey, HightToLow ? int.MinValue : int.MaxValue); } HighScore = PlayerPrefs.GetInt(highscorePlayerPrefsKey, 0); HasNewHighScore = false; globalRating = dreamloLeaderBoard.GetSceneDreamloLeaderboard(); globalRating.LoadScores(); }
void Start() { buttonSoundGO = GameObject.Find("ButtonSound"); bsAudio = buttonSoundGO.GetComponent <AudioSource> (); bsAudio.clip = buttonSound; Dreamlo = GameObject.Find("Dreamlo"); DL = (dreamloLeaderBoard)Dreamlo.GetComponent(typeof(dreamloLeaderBoard)); HighScoresPanel.SetActive(false); bestScore = PlayerPrefs.GetInt("bestScore"); lastScore = PlayerPrefs.GetInt("lastScore"); if (bestScore == 0) { bestScore = 0; } bestScoreCount.text = bestScore.ToString(); lastScoreCount.text = lastScore.ToString(); DL.LoadScores(); }
void Start() { leaderBoard = dreamloLeaderBoard.GetSceneDreamloLeaderboard(); pilot = FindObjectOfType <Pilot>(); pilot_ID_Field = FindObjectOfType <Pilot_ID_Field>(); readout = GetComponent <TextMeshProUGUI>(); timeKeeper = FindObjectOfType <Timekeeper>(); if (WebGL) { webGL = true; } else { leaderBoard.LoadScores(); } records.Clear(); pilot_ID_Field.PilotID = pilot.ID; pilot_ID_Field.SetID(); // triggers a parse }
IEnumerator savescore() { WWW www = new WWW(dl.dreamloWebserviceURL + "5bae2eb1613a88061429d460" + "/pipe-get/" + WWW.EscapeURL("bY0dqpzLrCvwt2iO3aOg")); yield return(www); string s = www.text; char[] dollarSign = "$".ToCharArray(); char[] stick = "|".ToCharArray(); string[] all = s.Split(stick[0]); string gameInfoString = all[3]; string[] splittedGameInfo = gameInfoString.Split(dollarSign[0]); switch (splittedGameInfo[1].ToString().ToLower()) { case "true": break; case "false": PlayerPrefs.SetInt("sidsteKlub", klub.value); // add the score... if (dl.publicCode == "") { Debug.LogError("You forgot to set the publicCode variable"); } if (dl.privateCode == "") { Debug.LogError("You forgot to set the privateCode variable"); } dl.AddScore(GOInput.text + "$" + klub.value + "$" + PlayerPrefs.GetString("PlayerID"), Points); // add the score dl.LoadScores(); StartCoroutine(DumbWaitHAckAgain()); break; } }
public void updateLeaderBoard() { Debug.Log("Carregando Scores"); leaderBoard.LoadScores(); //leaderBoard.ToListHighToLow(); }
public void LoadLeaderboard() { dl.LoadScores(); ls = leaderboardState.leaderboard; }