// Use this for initialization void Start() { lvl = FindObjectOfType <LevelControllerScript>(); footsoundMgr = GameObject.Find("FootstepSoundManager").GetComponent <FootstepSoundManager>(); RecoilRemain = RecoilTime; enabled = true; }
void Awake() { locationName = SceneManager.GetActiveScene().name; Debug.Log("Setting location name to: " + locationName); mcRef = GameObject.Find("MasterController").GetComponent <MasterControllerScript>(); ds = mcRef.getStorage(); rosetta = GameObject.Find("Rosetta").GetComponent <Rosetta> (); GameObject PlayerGO = GameObject.Find("Player"); if (PlayerGO != null) { player = PlayerGO.GetComponent <PlayerScript> (); } footstepMngr = GameObject.Find("FootstepSoundManager").GetComponent <FootstepSoundManager> (); GameObject cam = GameObject.Find("Main Camera"); if (cam != null) { cameraGrab = cam.GetComponent <CameraUtils> (); } string savedSound = ds.retrieveStringValue("GroundType"); if (!savedSound.Equals("")) { footstepMngr.setGroundType(savedSound); } else { if (!groundType.Equals("")) { footstepMngr.setGroundType(groundType); } } aSource = this.GetComponent <AudioSource> (); }