void SetInitialReferences() { if (GameObject.Find("SceneCamera") != null) { Debug.Log("found camera"); sceneCameraObj = GameObject.Find("SceneCamera"); } if (GameObject.Find("_GameManager") != null) { gameManagerMaster = GameObject.Find("_GameManager").GetComponent<GameManager_Master>(); gameManagerPlayers = GameObject.Find("_GameManager").GetComponent<GameManager_Players>(); gameManagerMaster.isAlive = true; gameManagerMaster.CallEventCursorLockUpdate(); } else { Debug.LogError("No GameManager found!"); } if (GetComponent<ProjectileHandler>() != null) { projectileHandler = GetComponent<ProjectileHandler>(); } if (GetComponent<Player_Master>() != null) { playerMaster = GetComponent<Player_Master>(); } }
void SetInitialReferences() { if (GameObject.Find("_GameManager") != null) { gameManagerMaster = GameObject.Find("_GameManager").GetComponent<GameManager_Master>(); gameManagerPlayers = GameObject.Find("_GameManager").GetComponent<GameManager_Players>(); } else { Debug.LogError("No GameManager found!"); } }