private IEnumerator GameOver() { isCoR = true; yield return(new WaitForSecondsRealtime(.1f)); if (Time.timeScale != 0) { Time.timeScale = 0; gm.cwis1Turret.enabled = false; gm.cwis2Turret.enabled = false; gm.isGameRunning = false; for (int i = 0; i < ms.activeMissiles.Count; i++) { ms.activeMissiles[i].SetActive(false); } //#if UNITY_STANDALONE LeaderboardData _data = new LeaderboardData(); _data.name = PlayerPrefs.GetString("PlayerName"); _data.score = gm.score; StartCoroutine(OnlineLeaderboardManager.SendDataOnline(_data)); //#endif ms.enabled = false; } }
void SendDataToBoard(UltimatePinballLeaderboardData Data, int Player) { if ((!HasDataSentP1) && (Player == 0)) { if (Player1_LB_Data.PlayerName == "") { Player1_LB_Data.PlayerName = "Unknown"; } else { Player1_LB_Data.PlayerName = Player1_LB_Data.PlayerName.Substring(0, 1).ToString() + Player1_LB_Data.PlayerName.Substring(1).ToString().ToLower(); Player1Name.text = "Player 1 - " + Player1_LB_Data.PlayerName; } StartCoroutine(OnlineLeaderboardManager.Send_UltimatePinball_Data_Online(Data)); HasDataSentP1 = true; Debug.Log("Data Send P1"); } else if ((!HasDataSentP2) && (Player == 1)) { if (Player2_LB_Data.PlayerName == "") { Player2_LB_Data.PlayerName = "Unknown"; } else { Player2_LB_Data.PlayerName = Player2_LB_Data.PlayerName.Substring(0, 1).ToString() + Player2_LB_Data.PlayerName.Substring(1).ToString().ToLower(); Player2Name.text = "Player 2 - " + Player2_LB_Data.PlayerName; } StartCoroutine(OnlineLeaderboardManager.Send_UltimatePinball_Data_Online(Data)); HasDataSentP2 = true; Debug.Log("Data Send P2"); } }
public void SendDataToBoard(StarshineLeaderboardData Data) { if ((CheckFullData(Data)) && (!HasDataSent)) { StartCoroutine(OnlineLeaderboardManager.Send_OPSS_Data_Online(Data)); HasDataSent = true; Debug.Log("Data Send"); } else if ((!CheckFullData(Data)) && (!HasDataSent)) { Debug.LogWarning("Data Not Send - Not all values were filled"); } }