/// Can't use Start() because splash screen means the game runs behind >:( public void StartAfterSplashscreen() { UIController = GetComponent <UIControl>(); SetupSlots(); UIController.SetupScoreText(); UIController.ShowTitle(); string nextMethod; if (PlayerPrefs.GetInt("HasCompletedARound", 0) == 0) { // if is first run go straight into a timed round gameMode = Mode.Timed; nextMethod = "StartRound"; } else { // otherwise allow the player to select timed or lives modes nextMethod = "ShowModeSelectScreen"; } Invoke(nextMethod, UIController.titleAnimateTime * 1.5f + UIController.titleDisplayTime + gameStartDelay); sfx = GetComponent <Sounds>(); LBHandler = GetComponent <LeaderboardHandler>(); }
private static void callSaveChanges(object sender, ElapsedEventArgs e) { LeaderboardHandler leaderboardHandler = new LeaderboardHandler(); ResultsHandler resultsHandler = new ResultsHandler(); resultsHandler .DoWork() .ContinueWith(async(prevTask) => { await leaderboardHandler.DoWork(); }); }
// private LeaderboardDataRequest leaderboardDataRequest; //private LogEventRequest logEventRequest; void Awake () { if (instance != null){ Destroy(gameObject); return; } instance = this; dreamloRef = dreamloLeaderBoard.Instance; // leaderboardDataRequest = new LeaderboardDataRequest(); //logEventRequest = new LogEventRequest(); DontDestroyOnLoad(gameObject); }
public void UploadScore() { if (string.IsNullOrEmpty(_inputField.text)) { return; } LeaderboardHandler.UploadScore(_inputField.text, _score.Value); _inputField.interactable = false; _button.GetComponentInChildren <TextMeshProUGUI>().text = "Uploaded"; _button.GetComponentInChildren <TextMeshProUGUI>().color = Color.green; _button.interactable = false; }
/// Can't use Start() because splash screen means the game runs behind >:( public void StartAfterSplashscreen () { UIController = GetComponent<UIControl>(); SetupSlots(); UIController.SetupScoreText(); UIController.ShowTitle(); string nextMethod; if (PlayerPrefs.GetInt("HasCompletedARound", 0) == 0) { // if is first run go straight into a timed round gameMode = Mode.Timed; nextMethod = "StartRound"; } else { // otherwise allow the player to select timed or lives modes nextMethod = "ShowModeSelectScreen"; } Invoke(nextMethod, UIController.titleAnimateTime * 1.5f + UIController.titleDisplayTime + gameStartDelay); sfx = GetComponent<Sounds>(); LBHandler = GetComponent<LeaderboardHandler>(); }
private void Awake() { leaderboardHandler = FindObjectOfType <LeaderboardHandler>(); }
private void AddScoreToLeaderBoard(string input) { LeaderboardHandler.AddNewHighscore(input, CurrentScore); }
private void Awake() { instance = this; }