public void Initialize(SoundSystem.SoundType soundType, SoundClip soundClip, SoundSystem soundSystem, bool loopPlay = false, bool continouslyUpdate = false, bool autoplay = false) { if (started) { Debug.LogError("Tryed to initialize SoundSource, but already playing! ", this); return; } if (soundClip == null) { Debug.LogError("soundClip is null! ", this); return; } if (soundSystem == null) { Debug.LogError("soundSystem is null! ", this); return; } this.soundType = soundType; this.soundClip = soundClip; this.soundSystem = soundSystem; this.loopPlay = loopPlay; this.continouslyUpdate = continouslyUpdate; if (autoplay) { Play(); } }
public SoundSegment(int id, Vector3 ogn, Vector3 dir, RaycastHit hit, float volume, SoundType type) { _id = id; _ray = new Ray { origin = ogn, direction = dir }; _hit = hit; _volume = volume; _type = type; _reflectNum = 0; }