public void setShape(SoundShape newShape) { if (objSelectionRadius == null) { CreateNewObjSelectionRadius(); } objSelectionRadius.activeShape = newShape; }
public void SetHotspot(Hotspot newHotspot, bool overrideInteralData = true) { hotspot = newHotspot; if (overrideInteralData) { iconIndex = newHotspot.iconIndex; colorIndex = newHotspot.colorIndex; _audioSrc.volume = newHotspot.soundVolume; _audioSrc.loop = newHotspot.loopAudio; soundShape = (SoundShape)newHotspot.soundShapeIndex; followCameraYPos.enabled = (soundShape == SoundShape.Column); filterDistortion.enabled = newHotspot.distortion > 0.1f; filterDistortion.distortionLevel = 0.9f; SetFreqCutoffComponents(newHotspot.freqCutoff); filterPhaser.setEnabled(Mathf.Abs(newHotspot.phaserLevel) > 0.1f); filterEcho.enabled = newHotspot.echoMagnitude > 0.1f; // filterEcho.wetMix = 0; // Set the audioSource min/max distance in the correct order if (newHotspot.minDistance < _audioSrc.maxDistance) { soundMinDist = newHotspot.minDistance; soundMaxDist = newHotspot.maxDistance; } else if (newHotspot.maxDistance > _audioSrc.minDistance) { soundMaxDist = newHotspot.maxDistance; soundMinDist = newHotspot.minDistance; } else { soundMinDist = newHotspot.minDistance; soundMaxDist = newHotspot.maxDistance; soundMinDist = newHotspot.minDistance; } } }
public void SetToNextSoundShape() { soundShape = (SoundShape)(((int)soundShape + 1) % SingletonData.Instance.soundShapeSprites.Length); }