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

A class used to define a signal, meant to be broadcasted by a MMRadioBroadcaster It'll output a Level value to broadcast, using one time, persistent or driven modes
Meant to be extended More...

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

Public Types

enum  SignalModes { OneTime , Persistent , Driven }
 
enum  TimeScales { Unscaled , Scaled }
 whether this signal operates on scaled or unscaled time More...
 

Public Member Functions

virtual void StartShaking ()
 Starts shaking the values More...
 
virtual float GraphValue (float time)
 
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

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

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 Shake ()
 Override this method to implement shake over time More...
 
virtual void ShakeComplete ()
 Describes what happens when the shake is complete 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...
 

Protected Attributes

float _signalTime = 0f
 
float _shakeStartedTimestamp
 
float _levelLastFrame
 

Properties

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 define a signal, meant to be broadcasted by a MMRadioBroadcaster It'll output a Level value to broadcast, using one time, persistent or driven modes
Meant to be extended

Member Enumeration Documentation

◆ SignalModes

the possible modes a radio signal can operate on

  • one time : plays its signal once, goes back to sleep
  • outputs a signal constantly while not sleeping
  • driven : lets you drive the level value from another script
Enumerator
OneTime 
Persistent 
Driven 

◆ TimeScales

whether this signal operates on scaled or unscaled time

Enumerator
Unscaled 
Scaled 

Member Function Documentation

◆ ApplyBias()

virtual float MoreMountains.Tools.MMRadioSignal.ApplyBias ( float  t,
float  bias 
)
virtual

Applies a bias to a time value

Parameters
t
bias
Returns

◆ Awake()

virtual void MoreMountains.Tools.MMRadioSignal.Awake ( )
protectedvirtual

On Awake we grab our volume and profile

◆ GraphValue()

virtual float MoreMountains.Tools.MMRadioSignal.GraphValue ( float  time)
virtual

◆ Initialization()

virtual void MoreMountains.Tools.MMRadioSignal.Initialization ( )
protectedvirtual

Override this method to initialize your shaker

◆ OnDestroy()

virtual void MoreMountains.Tools.MMRadioSignal.OnDestroy ( )
protectedvirtual

On destroy we stop listening for events

◆ OnDisable()

virtual void MoreMountains.Tools.MMRadioSignal.OnDisable ( )
protectedvirtual

On disable we complete our shake if it was in progress

◆ OnEnable()

virtual void MoreMountains.Tools.MMRadioSignal.OnEnable ( )
protectedvirtual

On enable we start shaking if needed

◆ Play()

virtual void MoreMountains.Tools.MMRadioSignal.Play ( )
virtual

Starts this shaker

◆ ProcessDrivenMode()

virtual void MoreMountains.Tools.MMRadioSignal.ProcessDrivenMode ( )
protectedvirtual

A method to override to describe the behaviour in Driven mode

◆ ProcessUpdate()

virtual void MoreMountains.Tools.MMRadioSignal.ProcessUpdate ( )
protectedvirtual

A method to override to describe what should happen at update

◆ Shake()

virtual void MoreMountains.Tools.MMRadioSignal.Shake ( )
protectedvirtual

Override this method to implement shake over time

Reimplemented in MoreMountains.Tools.MMRadioSignalAudioAnalyzer, and MoreMountains.Tools.MMRadioSignalGenerator.

◆ ShakeComplete()

virtual void MoreMountains.Tools.MMRadioSignal.ShakeComplete ( )
protectedvirtual

Describes what happens when the shake is complete

Reimplemented in MoreMountains.Tools.MMRadioSignalGenerator.

◆ ShakeStarts()

virtual void MoreMountains.Tools.MMRadioSignal.ShakeStarts ( )
protectedvirtual

Describes what happens when a shake starts

◆ StartShaking()

virtual void MoreMountains.Tools.MMRadioSignal.StartShaking ( )
virtual

Starts shaking the values

◆ Stop()

virtual void MoreMountains.Tools.MMRadioSignal.Stop ( )
virtual

Starts this shaker

◆ Update()

virtual void MoreMountains.Tools.MMRadioSignal.Update ( )
protectedvirtual

On Update, we shake our values if needed, or reset if our shake has ended

Member Data Documentation

◆ _levelLastFrame

float MoreMountains.Tools.MMRadioSignal._levelLastFrame
protected

◆ _shakeStartedTimestamp

float MoreMountains.Tools.MMRadioSignal._shakeStartedTimestamp
protected

◆ _signalTime

float MoreMountains.Tools.MMRadioSignal._signalTime = 0f
protected

◆ CurrentLevel

float MoreMountains.Tools.MMRadioSignal.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)

◆ DriverTime

float MoreMountains.Tools.MMRadioSignal.DriverTime

the driver time, that can be controlled from another class if you're in Driven mode

◆ Duration

float MoreMountains.Tools.MMRadioSignal.Duration = 1f

the duration of the shake, in seconds

◆ GlobalMultiplier

float MoreMountains.Tools.MMRadioSignal.GlobalMultiplier = 1f

a global multiplier to apply to the end result of the combination

◆ OnValueChange

MMRadioSignalOnValueChange MoreMountains.Tools.MMRadioSignal.OnValueChange

an event to trigger on value change

◆ Playing

bool MoreMountains.Tools.MMRadioSignal.Playing = false

whether or not this shaker is shaking right now

◆ PlayOnStart

bool MoreMountains.Tools.MMRadioSignal.PlayOnStart = true

if this is true this shaker will play on awake

◆ SignalMode

SignalModes MoreMountains.Tools.MMRadioSignal.SignalMode = SignalModes.Persistent

the selected signal mode

◆ StartShakingButton

bool MoreMountains.Tools.MMRadioSignal.StartShakingButton

a test button to start shaking

◆ TimeScale

TimeScales MoreMountains.Tools.MMRadioSignal.TimeScale = TimeScales.Unscaled

the selected time scale

Property Documentation

◆ Level

virtual float MoreMountains.Tools.MMRadioSignal.Level
get

the level, to read from a MMRadioBroadcaster

◆ TimescaleDeltaTime

float? MoreMountains.Tools.MMRadioSignal.TimescaleDeltaTime
get

the delta time, unscaled or not

◆ TimescaleTime

float? MoreMountains.Tools.MMRadioSignal.TimescaleTime
get

the time, unscaled or scaled


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