Inventory Engine  v4.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMRadioBroadcaster Class Reference

A class used to broadcast a level to MMRadioReceiver(s), either directly or via events It can read from pretty much any value on any class More...

Inherits MoreMountains.Tools.MMMonoBehaviour.

Public Member Functions

delegate void OnValueChangeDelegate ()
 a delegate to handle value changes More...
 

Public Attributes

MMPropertyEmitter Emitter
 the emitter to read the level on More...
 
MMRadioReceiver[] Receivers
 a list of receivers hardwired to this broadcaster, that will receive the level at runtime More...
 
bool BroadcastOnChannel = true
 whether or not this broadcaster should use events to broadcast its level on the specified channel More...
 
int Channel = 0
 the channel to broadcast on, has to match the Channel on the target receivers More...
 
bool OnlyBroadcastOnValueChange = true
 whether to broadcast all the time, or only when the value changes (lighter on performance, but won't "lock" the value) More...
 
OnValueChangeDelegate OnValueChange
 what to do on value change More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we initialize our emitter More...
 
virtual void Update ()
 On Update we process our broadcast More...
 
virtual void ProcessBroadcast ()
 Broadcasts the value if needed More...
 

Protected Attributes

float _levelLastFrame = 0f
 

Detailed Description

A class used to broadcast a level to MMRadioReceiver(s), either directly or via events It can read from pretty much any value on any class

Member Function Documentation

◆ Awake()

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

On Awake we initialize our emitter

◆ OnValueChangeDelegate()

delegate void MoreMountains.Tools.MMRadioBroadcaster.OnValueChangeDelegate ( )

a delegate to handle value changes

◆ ProcessBroadcast()

virtual void MoreMountains.Tools.MMRadioBroadcaster.ProcessBroadcast ( )
protectedvirtual

Broadcasts the value if needed

◆ Update()

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

On Update we process our broadcast

Member Data Documentation

◆ _levelLastFrame

float MoreMountains.Tools.MMRadioBroadcaster._levelLastFrame = 0f
protected

◆ BroadcastOnChannel

bool MoreMountains.Tools.MMRadioBroadcaster.BroadcastOnChannel = true

whether or not this broadcaster should use events to broadcast its level on the specified channel

◆ Channel

int MoreMountains.Tools.MMRadioBroadcaster.Channel = 0

the channel to broadcast on, has to match the Channel on the target receivers

◆ Emitter

MMPropertyEmitter MoreMountains.Tools.MMRadioBroadcaster.Emitter

the emitter to read the level on

◆ OnlyBroadcastOnValueChange

bool MoreMountains.Tools.MMRadioBroadcaster.OnlyBroadcastOnValueChange = true

whether to broadcast all the time, or only when the value changes (lighter on performance, but won't "lock" the value)

◆ OnValueChange

OnValueChangeDelegate MoreMountains.Tools.MMRadioBroadcaster.OnValueChange

what to do on value change

◆ Receivers

MMRadioReceiver [] MoreMountains.Tools.MMRadioBroadcaster.Receivers

a list of receivers hardwired to this broadcaster, that will receive the level at runtime


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