// Use this for initialization void Start() { gameManagerScript = GameObject.Find("GameManagerObj").GetComponent <GameManagerScript>(); goalScript = GameObject.Find("GameManagerObj").GetComponent <GoalZoneScript>(); camScript = Camera.main.GetComponent <CameraFollow>(); playerBounds = gameObject.GetComponent <BoxCollider>(); playerCon = gameObject.GetComponent <PlayerController>(); dying = false; playerOutsides = GetComponentsInChildren <PlayerOutsides>(); }
// Use this for initialization void Start() { camScript = Camera.main.GetComponent <CameraFollow>(); goalScript = gameObject.GetComponent <GoalZoneScript>(); //Physics.IgnoreLayerCollision(8, 9); Physics.IgnoreLayerCollision(8, 10); pressToStart = GameObject.Find("PressToStart"); checkText1 = GameObject.FindGameObjectWithTag("TimerCheck1").GetComponent <TextMeshPro>(); checkText2 = GameObject.FindGameObjectWithTag("TimerCheck2").GetComponent <TextMeshPro>(); checkText3 = GameObject.FindGameObjectWithTag("TimerCheck3").GetComponent <TextMeshPro>(); checkText4 = GameObject.FindGameObjectWithTag("TimerCheck4").GetComponent <TextMeshPro>(); checkText5 = GameObject.FindGameObjectWithTag("TimerCheck5").GetComponent <TextMeshPro>(); subTimer1 = GameObject.FindGameObjectWithTag("SubPoint1").GetComponent <TextMeshPro>(); subTimer2 = GameObject.FindGameObjectWithTag("SubPoint2").GetComponent <TextMeshPro>(); subTimer3 = GameObject.FindGameObjectWithTag("SubPoint3").GetComponent <TextMeshPro>(); subTimer4 = GameObject.FindGameObjectWithTag("SubPoint4").GetComponent <TextMeshPro>(); subTimer5 = GameObject.FindGameObjectWithTag("SubPoint5").GetComponent <TextMeshPro>(); dangerFloors = GameObject.FindGameObjectsWithTag("DangerFloor"); }