// Use this for initialization protected override void Start() { _inst = null; panel = GameObject.FindGameObjectWithTag("DialogPanel"); avatarImage = GameObject.FindGameObjectWithTag("DialogHead").GetComponent<Image>(); avatarCharacterImage = GameObject.FindGameObjectWithTag("DialogHeadCharacter").GetComponent<Image>(); dabingAudioSource = GameObject.FindGameObjectWithTag("DialogPanel").GetComponent<AudioSource>(); dialogueBlocker = FindObjectOfType<DialogueBlockerController>(); textObject = GetComponentInChildren<Text>(); panel.SetActive(false); dialogueBlocker.Deactivate(); isLoaded = createDialogs(); }
// Use this for initialization private void Start() { Fader = GetComponentInChildren<SceneFadeInOut>(); CursorManager = GetComponent<CursorManager>(); PlayerController = PlayerCharacter.GetComponent<PawnController>(); DescriptionController = FindObjectOfType<DescriptionController>(); dialogueBlocker = FindObjectOfType<DialogueBlockerController>(); HidingController = FindObjectOfType<HidingController>(); ControlsScreenController = FindObjectOfType<ControlsScreenController>(); if (PlayerController == null) { Debug.LogError("No controller"); return; } var enterData = GetEnterData(PreviousLoadedLevel); PlayerController.SetInitPosition(enterData.StartPoint); PlayerController.SetNewFacing(enterData.Direction); }