void Start() { data.subscribe(this); if (level == null) { level = "1"; } StartCoroutine(RankingRestManager.getScores(level, data)); }
public void winGame(string levelId) { var sendingTime = TimeData.getInstance().getTimeToString(); print(sendingTime); var sendingScore = TimeData.getInstance().getScore().ToString(); StartCoroutine(RankingRestManager.setNewScore(levelId, sendingTime, sendingScore)); //completedUI.SetActive(true); winPanel.SetActive(true); pointsTextField.text = sendingScore.ToString(); translateUI(); //GameObject.Find("game-over-text-win").GetComponent<Text>().text = languageManager.getText("game-over-text-win"); //GameObject.Find("you-win-title").GetComponent<Text>().text = languageManager.getText("you-win-title"); Time.timeScale = 0; GetComponent <TimeUIManager>().endTime(); }