Inventory Engine v4.2
Loading...
Searching...
No Matches
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

Public Attributes

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

Protected Member Functions

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

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: