void Start() { //Debug.Log("Event script for room 2 initialized!"); exitDoor = GameObject.FindWithTag("Exit_R2").GetComponent <door_script>(); entryDoor = GameObject.FindWithTag("Entry_R2").GetComponent <door_script>(); player = GameObject.FindObjectOfType(typeof(player_script)) as player_script; nextEventScript = GameObject.FindObjectOfType(typeof(event_script_R3)) as event_script_R3; dialogManager = GameObject.FindObjectOfType(typeof(dialog_script)) as dialog_script; }
void Start() { roomA = GameObject.FindObjectOfType(typeof(event_script_A)) as event_script_A; room1 = GameObject.FindObjectOfType(typeof(event_script_R1)) as event_script_R1; room2 = GameObject.FindObjectOfType(typeof(event_script_R2)) as event_script_R2; room3 = GameObject.FindObjectOfType(typeof(event_script_R3)) as event_script_R3; room4 = GameObject.FindObjectOfType(typeof(event_script_R4)) as event_script_R4; room5 = GameObject.FindObjectOfType(typeof(event_script_R5)) as event_script_R5; player = GameObject.FindObjectOfType(typeof(player_script)) as player_script; playerCameraObject = GameObject.FindWithTag("MainCamera"); playerCamera = playerCameraObject.GetComponent <Camera> (); }