// Use this for initialization protected override void Start() { base.Start(); liner = GetComponent <LineRenderer> (); BeatScheduler.ScheduleNextMeasure(new StartTrackEvent(track)); soundpicker = new SoundRandomizer(audioSource, shootingSounds); }
// Use this for initialization protected override void Start() { base.Start (); liner = GetComponent<LineRenderer> (); BeatScheduler.ScheduleNextMeasure (new StartTrackEvent (track)); soundpicker = new SoundRandomizer (audioSource, shootingSounds); }
void Start() { try { soundthing = gameObject.GetComponent <SoundRandomizer>(); soundthing.ToString(); } catch { Debug.LogWarning("This thing does not have a SoundRandomizer, so there won't be any sound."); } }
void Awake() { leftStepSoundRandomizer = leftStepSound.GetComponent <SoundRandomizer>(); rightStepSoundRandomizer = rightStepSound.GetComponent <SoundRandomizer>(); jumpSoundRandomizer = jumpSound.GetComponent <SoundRandomizer>(); landSoundRandomizer = landSound.GetComponent <SoundRandomizer>(); hitSoundRandomizer = hitSound.GetComponent <SoundRandomizer>(); collectableSoundRandomizers = new SoundRandomizer[collectableSounds.Length]; for (int i = 0; i < collectableSounds.Length; i++) { collectableSoundRandomizers[i] = collectableSounds[i].GetComponent <SoundRandomizer>(); } //stepFrequency *= Mathf.PI; }
// Use this for initialization void Start() { counterComponent = GameObject.FindGameObjectWithTag("CookieCounter").GetComponent <Text>(); ammoComponent = GameObject.FindGameObjectWithTag("Ammo").GetComponent <Ammo>(); layerMask = ~(1 << 9); //All layers except nr. 9, the player; hopefully try{ soundthing = gameObject.GetComponent <SoundRandomizer>(); }catch { Debug.LogWarning("This thing does not have a SoundRandomizer, so there won't be any sound."); } counterComponent.text = "People Eaten: " + cookieCounter; StartCoroutine("regenerateFlintlocks"); }