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> (); }
// Use this for initialization void Start() { //Debug.Log("Event script for room 3 initialized!"); exitDoor = GameObject.FindWithTag("Exit_R3").GetComponent <door_script>(); entryDoor = GameObject.FindWithTag("Entry_R3").GetComponent <door_script>(); player = GameObject.FindObjectOfType(typeof(player_script)) as player_script; nextEventScript = GameObject.FindObjectOfType(typeof(event_script_R4)) as event_script_R4; dialogManager = GameObject.FindObjectOfType(typeof(dialog_script)) as dialog_script; event1 = GameObject.FindWithTag("Bridge_Start").GetComponent <ColliderListener> (); planken = GameObject.FindWithTag("Panken"); spieler = GameObject.FindWithTag("Player"); collider = GameObject.FindGameObjectWithTag("Bridge").GetComponent <Collider2D>(); //audio = GameObject.Find ("EventManager_Anfang"); }