public void ResponseTopScore(ExtendedEventArgs eventArgs) { Debug.Log("Callback for MessageReceived"); ResponseTopScoreEventArgs args = eventArgs as ResponseTopScoreEventArgs; // GameObject readyScreen = player.transform.GetChild(1).gameObject; Debug.Log("I am here in CountdownTimer.cs Script"); string teamName = args.teamName; string teamTime = args.time; //countDownText.text = teamName + teamTime + " \n"; string[] teams = teamName.Split(','); string[] timer = teamTime.Split(','); countDownText.text = ""; countDownTeamName.text = ""; for (int i = 0; i < teams.Length; i++) { int count = i + 1; Debug.Log("Team: " + countDownText.text); int seconds = (int.Parse(timer[i]) % 60); int minutes = (int.Parse(timer[i]) / 60) % 60; int hours = (int.Parse(timer[i]) / 3600) % 24; string timeString = string.Format("{0:0}:{1:00}:{2:00 }", hours, minutes, seconds); countDownTeamName.text = string.Format(countDownTeamName.text + count + ". " + teams[i] + "\n"); countDownText.text = string.Format(countDownText.text + timeString + "\n"); } }
public override ExtendedEventArgs process() { ResponseTopScoreEventArgs args = null; args = new ResponseTopScoreEventArgs(); args.teamName = teamName; args.time = time; Debug.Log("Team Name received from DB: " + teamName); Debug.Log("TIme received from DB: " + time); return(args); }