Interface IFeedbackChannel
One output modality of the feedback system (vibration, LED, screen flash, hit-stop, screen
shake, …). The service routes each IFeedbackEffect to every channel whose
CanPlay(IFeedbackEffect) returns true. Channels are actuators: they receive an already-scaled effect
and own its lifetime (duration/restoration), scheduling work via IFeedbackRuntime.
Namespace: Serenity.Feedback.Application.Interfaces
Assembly: Serenity.Feedback.Application.dll
Syntax
public interface IFeedbackChannel
Properties
ChannelId
Declaration
string ChannelId { get; }
Property Value
| Type | Description |
|---|---|
| string | Stable identifier of the channel (e.g. "vibration", "led"). |
Methods
CanPlay(IFeedbackEffect)
Whether this channel handles the given effect type.
Declaration
bool CanPlay(IFeedbackEffect effect)
Parameters
| Type | Name | Description |
|---|---|---|
| IFeedbackEffect | effect | The effect to test. |
Returns
| Type | Description |
|---|---|
| bool | True when this channel can actuate the effect. |
Play(FeedbackTarget, IFeedbackEffect)
Actuates an already-scaled effect on the given target.
Declaration
void Play(FeedbackTarget target, IFeedbackEffect effect)
Parameters
| Type | Name | Description |
|---|---|---|
| FeedbackTarget | target | The resolved target (relevant for gamepad channels; ignored by screen-global ones). |
| IFeedbackEffect | effect | The already-scaled effect to play. |
Stop(FeedbackTarget)
Stops output for the given target.
Declaration
void Stop(FeedbackTarget target)
Parameters
| Type | Name | Description |
|---|---|---|
| FeedbackTarget | target | The target to silence. |
StopAll()
Stops/restores output for every target this channel can reach.
Declaration
void StopAll()