//Load all scripts that will be controlled by scene flow controller void GetScripts() { audioCS = GameObject.FindGameObjectWithTag("AudioController").GetComponent <AudioControlScript>(); dialogueScript = dialogueUI.GetComponent <DialogueHandler>(); mapScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <OverworldMapControl>(); camScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <MapCameraController>(); }
// Start is called before the first frame update void Start() { //get reference to audio m_audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>(); //get reference to Canvas controller m_canvas = GameObject.FindGameObjectWithTag("Canvas").GetComponent <CanvasController>(); }
void Awake() { sceneFC = GameObject.FindGameObjectWithTag("GameController").GetComponent <SceneFlowController>(); audioCS = GameObject.FindGameObjectWithTag("AudioController").GetComponent <AudioControlScript>(); lDefaultPos = lPortPos = leftPortrait.rectTransform.anchoredPosition; rDefaultPos = rPortPos = rightPortrait.rectTransform.anchoredPosition; ConstructDicts(); Reset(); }
bool m_isPlayerKilled = false; //flag private void Start() { m_audioSource = GetComponent <AudioSource>(); //play sound with slight delay Invoke("PlaySound", 0.25f); m_audioScript = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>(); //get particles m_ps = GetComponentsInChildren <ParticleSystem>(); }
private void Start() { m_audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>(); }