Highroad Engine v1.3
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
MoreMountains.Tools.MMRadioSignalGenerator Class Reference

A class used to generate signals, normalized values between 0 and 1 You can then use these values from a MMRadioBroadcaster, or simply evaluate its value to use wherever you want, like a supercharged animation curve. In that case, simply disable the component, and read from it using its Evaluate method More...

Inheritance diagram for MoreMountains.Tools.MMRadioSignalGenerator:
MoreMountains.Tools.MMRadioSignal

Public Member Functions

virtual float Evaluate (float time)
 Returns the y value of the generated signal curve, at the x time value specified in parameters More...
 
override float GraphValue (float time)
 returns a custom value to display in the graph in inspector More...
 
- Public Member Functions inherited from MoreMountains.Tools.MMRadioSignal
virtual void StartShaking ()
 Starts shaking the values More...
 
virtual void Play ()
 Starts this shaker More...
 
virtual void Stop ()
 Starts this shaker More...
 
virtual float ApplyBias (float t, float bias)
 Applies a bias to a time value More...
 

Public Attributes

bool AnimatedPreview = false
 whether or not to display an animated preview More...
 
bool BackAndForth = false
 whether this signal should play in back & forth (mirroring the curve around a tipping point) More...
 
float BackAndForthMirrorPoint = 0.5f
 the tipping point at which to mirror the curve (between 0 and 1) More...
 
MMRadioSignalGeneratorItemList SignalList
 the list of signals to assemble to create the final signal More...
 
Vector2 Clamps = new Vector2(0f, 1f)
 how to clamp the result value More...
 
float Bias = 0.5f
 the amplitude of the signal More...
 
- Public Attributes inherited from MoreMountains.Tools.MMRadioSignal
SignalModes SignalMode = SignalModes.Persistent
 the selected signal mode More...
 
TimeScales TimeScale = TimeScales.Unscaled
 the selected time scale More...
 
float Duration = 1f
 the duration of the shake, in seconds More...
 
float GlobalMultiplier = 1f
 a global multiplier to apply to the end result of the combination More...
 
float CurrentLevel = 0f
 the current level, not to be read from a broadcaster (it's best to use the property than the field, fields generate garbage) More...
 
bool Playing = false
 whether or not this shaker is shaking right now More...
 
float DriverTime
 the driver time, that can be controlled from another class if you're in Driven mode More...
 
bool PlayOnStart = true
 if this is true this shaker will play on awake More...
 
MMRadioSignalOnValueChange OnValueChange
 an event to trigger on value change More...
 
bool StartShakingButton
 a test button to start shaking More...
 

Protected Member Functions

override void Shake ()
 On Shake, we shake our level if needed More...
 
override void ShakeComplete ()
 Once the shake is complete, we apply our final level More...
 
- Protected Member Functions inherited from MoreMountains.Tools.MMRadioSignal
virtual void Awake ()
 On Awake we grab our volume and profile More...
 
virtual void Initialization ()
 Override this method to initialize your shaker More...
 
virtual void ShakeStarts ()
 Describes what happens when a shake starts More...
 
virtual void Update ()
 On Update, we shake our values if needed, or reset if our shake has ended More...
 
virtual void ProcessDrivenMode ()
 A method to override to describe the behaviour in Driven mode More...
 
virtual void ProcessUpdate ()
 A method to override to describe what should happen at update More...
 
virtual void OnEnable ()
 On enable we start shaking if needed More...
 
virtual void OnDestroy ()
 On destroy we stop listening for events More...
 
virtual void OnDisable ()
 On disable we complete our shake if it was in progress More...
 

Additional Inherited Members

- Public Types inherited from MoreMountains.Tools.MMRadioSignal
enum  SignalModes { OneTime , Persistent , Driven }
 
enum  TimeScales { Unscaled , Scaled }
 whether this signal operates on scaled or unscaled time More...
 
- Protected Attributes inherited from MoreMountains.Tools.MMRadioSignal
float _signalTime = 0f
 
float _shakeStartedTimestamp
 
float _levelLastFrame
 
- Properties inherited from MoreMountains.Tools.MMRadioSignal
virtual float Level [get]
 the level, to read from a MMRadioBroadcaster More...
 
float? TimescaleTime [get]
 the time, unscaled or scaled More...
 
float? TimescaleDeltaTime [get]
 the delta time, unscaled or not More...
 

Detailed Description

A class used to generate signals, normalized values between 0 and 1 You can then use these values from a MMRadioBroadcaster, or simply evaluate its value to use wherever you want, like a supercharged animation curve. In that case, simply disable the component, and read from it using its Evaluate method

Member Function Documentation

◆ Evaluate()

virtual float MoreMountains.Tools.MMRadioSignalGenerator.Evaluate ( float  time)
virtual

Returns the y value of the generated signal curve, at the x time value specified in parameters

Parameters
time
Returns

◆ GraphValue()

override float MoreMountains.Tools.MMRadioSignalGenerator.GraphValue ( float  time)
virtual

returns a custom value to display in the graph in inspector

Parameters
time
Returns

Reimplemented from MoreMountains.Tools.MMRadioSignal.

◆ Shake()

override void MoreMountains.Tools.MMRadioSignalGenerator.Shake ( )
protectedvirtual

On Shake, we shake our level if needed

Reimplemented from MoreMountains.Tools.MMRadioSignal.

◆ ShakeComplete()

override void MoreMountains.Tools.MMRadioSignalGenerator.ShakeComplete ( )
protectedvirtual

Once the shake is complete, we apply our final level

Reimplemented from MoreMountains.Tools.MMRadioSignal.

Member Data Documentation

◆ AnimatedPreview

bool MoreMountains.Tools.MMRadioSignalGenerator.AnimatedPreview = false

whether or not to display an animated preview

◆ BackAndForth

bool MoreMountains.Tools.MMRadioSignalGenerator.BackAndForth = false

whether this signal should play in back & forth (mirroring the curve around a tipping point)

◆ BackAndForthMirrorPoint

float MoreMountains.Tools.MMRadioSignalGenerator.BackAndForthMirrorPoint = 0.5f

the tipping point at which to mirror the curve (between 0 and 1)

◆ Bias

float MoreMountains.Tools.MMRadioSignalGenerator.Bias = 0.5f

the amplitude of the signal

◆ Clamps

Vector2 MoreMountains.Tools.MMRadioSignalGenerator.Clamps = new Vector2(0f, 1f)

how to clamp the result value

◆ SignalList

MMRadioSignalGeneratorItemList MoreMountains.Tools.MMRadioSignalGenerator.SignalList

the list of signals to assemble to create the final signal


The documentation for this class was generated from the following file: