// Start is called before the first frame update void Start() { ballManager = gameObject.GetComponent <BallManager>(); dataManager = gameObject.GetComponent <DataManager>(); playerCount = gameObject.GetComponent <PlayerCount>(); tempScoreDisplay = FindObjectOfType <TempScoreDisplay>(); parentCanvas = GameObject.FindWithTag("ParentCanvas").transform; startPhaseCanvas = parentCanvas.Find("StartPhaseCanvas").GetComponent <Canvas>(); nameplateCanvas = parentCanvas.Find("NameplateCanvas").GetComponent <Canvas>(); GetComponent <Canvas>(); Time.timeScale = 0f; gameStarted = false; gameRunning = false; gameEnded = false; nameplatesEnabled = (PlayerPrefs.GetInt("nameplatesEnabled", 1) == 1) ? true : false; commandsEnabled = (PlayerPrefs.GetInt("commandsEnabled", 1) == 1) ? true : false; topTwo = new string[2]; }
private void Start() { tempScoreDisplay = FindObjectOfType <TempScoreDisplay>(); playerCount = FindObjectOfType <PlayerCount>(); dataManager = FindObjectOfType <DataManager>(); if (killFeed == null) { killFeed = GameObject.Find("KillFeed").GetComponent <Text>(); if (killFeed == null) { Debug.LogError("Error! Couldn't find the KillFeed text in a canvas!"); } else { Debug.LogWarning("Warning! KillFeed wasn't assigned before running! Please set it in the gamecontroller killfeed script"); } } killFeed.transform.parent.GetComponent <Image>().enabled = false; }