1using NaughtyAttributes;
16 [AddComponentMenu(
"Ryle Radio/Radio Broadcaster")]
38 [Space(8), MinMaxSlider(0, 1), SerializeField]
44 [SerializeField, CurveRange(0, 0, 1, 1)]
53 [SerializeField, AllowNesting, ShowIf(
"ShowApplyToAllOutputs")]
105 float distance = Vector3.Distance(
cachedPos, _receiverPos);
An extension of RadioComponent that accesses specific tracks on the stored RadioData.
A "broadcaster" for a RadioTrackWrapper - the closer the RadioOutput that's playing the track is to a...
Vector3 cachedPos
The position of the broadcaster in the previous frame- we can't access transform.position in the audi...
bool ShowApplyToAllOutputs
Shows applyToAllOutputsOutside when the x-value of broadcastPowers is greater than 0.
float GetPower(Vector3 _receiverPos)
Gets the broadcast power of this particular broadcaster using the Output's position.
Vector2 broadcastRadius
The inner and outer radii of this broadcaster.
void Update()
Updates the position of this broadcaster.
bool applyToAllOutputsOutside
If the x-value of broadcastPowers should be applied to all Outputs outside of this broadcaster's radi...
Vector2 broadcastPowers
The power of this broadcaster at the maximum and minimum radii.
override void RemoveFromTrack(RadioTrackWrapper _track)
Unlinks this broadcaster from a track.
AnimationCurve distanceFalloff
The falloff curve between the inner and outer broadcast radii- the x-value is how far between the rad...
override void AssignToTrack(RadioTrackWrapper _track)
Links this broadcaster to a track.
A wrapper class for RadioTrack so that track types can be switched between in the inspector!...
Action< RadioBroadcaster, RadioTrackWrapper > OnAddBroadcaster
An event called when a broadcaster is added to the track.
Action< RadioBroadcaster, RadioTrackWrapper > OnRemoveBroadcaster
An event called when a broadcaster is removed from this track.
List< RadioBroadcaster > broadcasters
The broadcasters in the scene that have this track selected.
Base interfaces and classes for components, e.g: track accessors, output accessors.
Components to be placed on scene objects, e.g: Outputs, Broadcasters, Observers.
Tracks to be used on a radio- includes base classes.