public void Start() { loadStartTime = gameStartTime = -1.0; loadTime = 5f; matchTime = 90f; gameTimer.text = fToS(loadTime); myInd = -1; firstSpawn = true; isMapSpawned = false; gameStart = countdownStart = gameOver = false; SendNewPlayer(); Spawn(); pf = GameObject.Find("Authentication").GetComponent <PlayfabHandler>(); }
private void OnEnable() { if (pf == null) { pf = this; } else { if (pf != this) { Destroy(gameObject); } } DontDestroyOnLoad(gameObject); }