Class HitStopChannel
Feedback channel that implements hit-stop: briefly dips UnityEngine.Time.timeScale then restores
the prior value. Handles HitStopEffect. Target-agnostic (time scale is global).
Guards against fighting the pause system: if the game is paused when Play is called, the effect is
skipped. On restore, only resets timeScale if nobody else changed it in the interim.
Inheritance
HitStopChannel
Assembly: Serenity.UnityFeedback.Infrastructure.dll
Syntax
public class HitStopChannel : IFeedbackChannel
Constructors
HitStopChannel(IFeedbackRuntime, ILogService)
Initializes a new HitStopChannel.
Declaration
public HitStopChannel(IFeedbackRuntime runtime, ILogService log)
Parameters
| Type |
Name |
Description |
| IFeedbackRuntime |
runtime |
Coroutine host used to run and cancel the restore timer.
|
| ILogService |
log |
Log service for diagnostic messages.
|
Properties
ChannelId
Declaration
public string ChannelId { get; }
Property Value
Methods
CanPlay(IFeedbackEffect)
Declaration
public bool CanPlay(IFeedbackEffect effect)
Parameters
Returns
Play(FeedbackTarget, IFeedbackEffect)
Declaration
public void Play(FeedbackTarget target, IFeedbackEffect effect)
Parameters
Stop(FeedbackTarget)
Declaration
public void Stop(FeedbackTarget target)
Parameters
StopAll()
Declaration
Implements