void Awake() { try { ds = GameObject.FindGameObjectWithTag("Stick").GetComponent(typeof(DisplayScores)) as DisplayScores; } catch { } if (Ping(webURL + privateCode)) { print("U ONLINE FACE FACE"); StartCoroutine(UpdateLB()); if (SceneManager.GetActiveScene().name == "Leaderboard") { DownloadHighscores(); } } else if (SceneManager.GetActiveScene().name == "Leaderboard") { //Say that i'm offline; NoInternet.SetActive(true); Destroy(go); enabled = false; } }
void Start() { GameStateHolder.PlayerTurn = PlayerStateHolder.PlayerEnum.Unknown; PrevPlayerTurn = PlayerStateHolder.PlayerEnum.Unknown; FirstPlayerPocketedArray = new ArrayList(); SecondPlayerPocketedArray = new ArrayList(); DisplayScoreScript = (DisplayScores)GameObject.FindObjectOfType(typeof(DisplayScores)); PlayerPrefs.SetInt("Winner", -1); }
void Awake() { highscoresDisplay = GetComponent <DisplayScores> (); }
private void Start() { highscoresDisplay = GetComponent <DisplayScores>(); }
private void Awake() { instance = this; displayScores = GetComponent <DisplayScores>(); }
void Awake() { SharedInstance = this; scoreTexts = gameObject.GetComponentsInChildren <TextMeshProUGUI> (); }