public void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else { Destroy(gameObject); } client = GetComponent <HttpClient>(); }
void Start() { PrintHeight(); PrintBlockCount(); PrintTotalMass(); updateGameOverScoreText(); stateContainer = GameObject.Find("StateKeeper").GetComponent <GlobalStateContainer>(); bar = GameObject.Find("BarSpecial"); barNemesis = GameObject.Find("BarNemesis"); lives = startLives; gameOverSplash.SetActive(false); bar.SetActive(false); barNemesis.SetActive(false); GetComponent <HttpClient>().GetPersonalBest(stateContainer.playerName, RecieveUpdateMax); }