1using NaughtyAttributes;
3using UnityEngine.Events;
25 [AllowNesting, ShowIf(
"NeedComparison")]
32 [AllowNesting, ShowIf(EConditionOperator.And,
"NeedComparison",
"NotNeedVector",
"NotIsTune"), Range(0, 1)]
39 [AllowNesting, ShowIf(EConditionOperator.And,
"NeedComparison",
"NotNeedVector",
"IsTune"), Range(0.0f, 1000.0f)]
46 [AllowNesting, ShowIf(EConditionOperator.And,
"NeedComparison",
"NeedVector",
"NotIsTune"), MinMaxSlider(0, 1)]
53 [AllowNesting, ShowIf(EConditionOperator.And,
"NeedComparison",
"NeedVector",
"IsTune"), MinMaxSlider(0, 1000)]
64 [ShowIf(
"showEvents"), AllowNesting]
70 [ShowIf(EConditionOperator.And,
"showEvents",
"NeedComparison"), AllowNesting]
76 [ShowIf(EConditionOperator.And,
"showEvents",
"NeedComparison"), AllowNesting]
82 [HideInInspector]
public bool staying =
false;
138 ComparisonType.Equal => _cValue == value,
A singular event inside a RadioObserver, tracking a value or trigger and invoking methods accordingly...
bool showEvents
Show/hide events- useful when there's a lot of them.
UnityEvent< float > onTrigger
Called when eventType is fulfilled for the first time. Only called once until onEnd is called.
bool NotNeedComparison
Does this event not need a value or range to compare to?
bool NotNeedVector
Does this event not need a range to compare to, and uses a single value instead?
float tuneValue
A value clamped between 0 and 1000 to use in the comparison. Shows when a comparison is needed,...
UnityEvent< float > onStay
Called every frame while eventType is fulfilled, including the first. Cannot be called if eventType i...
bool NeedComparison
Does this event need a value or range to compare to?
EventType eventType
The type of event this is looking for.
bool EvaluateComparison(float _cValue)
If this event uses a comparison, check if its fulfilled.
override string ToString()
Makes the event more readable when printed, in the form "{eventType}/{comparisonType}...
bool staying
Tracks if this event has been called in this or the previous frame.
UnityEvent< float > onEnd
Called when eventType is no longer fulfilled. Only called once until the event is fulfilled again....
Vector2 tuneRange
A range between 0 and 1000 to use in the comparison. Shows when a comparison is needed,...
bool IsTune
Does this event use Tune?
bool NeedVector
Does this event need a range to compare to, not a single value?
ComparisonType comparisonType
The method of comparisonType used in this event- not shown if a Trigger event is chosen.
bool NotIsTune
Does this event not use Tune?
float clampedValue
A value clamped between 0 and 1 to use in the comparison. Shows when a comparison is needed,...
Vector2 clampedRange
A range between 0 and 1 to use in the comparisonType. Shows when a comparison is needed,...
A component used to watch for specific happenings on a RadioOutput, e.g: a clip being a certain volum...
EventType
The event an observer is looking for.
@ TunePower
The tune power of the track: how close the RadioOutput.Tune value is to the range of the track.
@ Gain
The gain of the track: this is currently defined exclusively in the track's gain variable.
@ OutputVolume
The volume of the track: tune power * broadcast power * insulation.
@ BroadcastPower
The broadcast power of the track: how close to any active RadioBroadcasters the output's transform is...
@ Insulation
The insulation of the track: the higher the value the less insulation- the power of any RadioInsulato...
ComparisonType
The method of comparisonType used for an event. For example, checking if the volume is greater than a...
@ GreaterThanOrEqual
The value is greater than a number.
@ BetweenExclusive
The value is between numbers x and y, including if it's equal to x or y.
@ LessThanOrEqual
The value is less than a number.
@ LessThan
The value is greater than or equal to a number.
@ BetweenInclusive
The value is less than or equal to a number.
@ GreaterThan
The value is equal to a number.
Components to be placed on scene objects, e.g: Outputs, Broadcasters, Observers.