void Awake() { mWorld = GameObject.Find("World").GetComponent<MoveWorld>(); pMov = GameObject.Find("Player").GetComponent<PlayerMovement>(); _ui = GameObject.Find("Canvas").GetComponent<UI>(); _camMoveSound = (AudioSource)gameObject.AddComponent<AudioSource>(); _camMoveSound.clip = (AudioClip)Resources.Load("Audio/cinematic"); _camMoveSound.volume = 2; }
// Use this for initialization void Start() { MW = GameObject.FindGameObjectWithTag("Player").GetComponent <MoveWorld>(); }
void Awake() { mWorld = GetComponent<MoveWorld>(); mPlayer = GameObject.Find("Player").GetComponent<PlayerMovement>(); sCinematic = GameObject.Find("Main Camera").GetComponent<StartCinematic>(); }