// Start is called before the first frame update void Start() { particles = GameObject.FindGameObjectWithTag("ParticleController").GetComponent <ParticleController>(); endLevel = false; //ObjMarkerSingle = ObjMarker.GetComponent<ObjectiveMarker>(); _phoneUI = GameObject.Find("PopUpPhone").GetComponent <PhoneUI>(); dataPost = GameObject.FindGameObjectWithTag("Data").GetComponent <DrivePost>(); Objectives[0].objectiveObject.SetActive(true); for (int i = 1; i < Objectives.Length; i++) { if (Objectives[i].objectiveObject != null) { //Debug.Log("Turning off " + Objectives[i].objectiveObject.name); if (Objectives[0].objectiveObject != Objectives[i].objectiveObject) { Objectives[i].objectiveObject.SetActive(false); } } } StartCoroutine(GameStartDelay(3)); foreach (Message m in Objectives[0].messages) { _phoneUI.SetNotifyMessage(m); } objectiveCount++; }
// Start is called before the first frame update void Start() { if (!nullValues) { string[] names = Input.GetJoystickNames(); foreach (string name in names) { if (name != "") { controllerPresent = true; Cursor.visible = false; } } player = GameObject.Find("Player").GetComponent <PlayerController>(); specials = player.gameObject.GetComponent <SpecialsManager>(); aerialListener = aerialCamera.GetComponent <AudioListener>(); mainListener = mainCamera.GetComponent <AudioListener>(); ObjMng = gameObject.GetComponent <ObjectivesManager>(); ArrInd = gameObject.GetComponent <ArrowIndicator>(); PhoneUI = GameObject.Find("PopUpPhone").GetComponent <PhoneUI>(); dataPost = GameObject.FindGameObjectWithTag("Data").GetComponent <DrivePost>(); int width = Screen.width; int height = Screen.height; float ratio = width / 1920; width = (int)(width * ratio); height = (int)(height * ratio); ArrInd.SetHideArrow(); #if UNITY_EDITOR Debug.Log("In Editor"); #else Screen.SetResolution(width, height, true); #endif } }