Skip to content

Class: Channel ​

  • Namespace: Global
  • Assembly: Dew.Core.dll
csharp
public class Channel

Fields ​

NameDeclarationDescription
blockedActionspublic Channel.BlockedAction blockedActionsBlocked actions for the owner of this channel.This channel will fail if any of the cancelable blocks is disobeyed.
durationpublic float durationTotal duration of this channel.
isAttackpublic bool isAttackOnly a single attack channel can exist in an entity.
onCancelpublic Action onCancelCallback function to be called when this channel has been canceled.This can be because of either an invalidation flag from any of the validators, or cancelable block being canceled by an entity.
onCompletepublic Action onCompleteCallback function to be called when this channel has been successfully completed.
onTickpublic Action<float> onTickCalled every logic update tick while channel is alive.
uncancellableTimepublic float uncancellableTimeIf this channel is cancellable, it won't be cancellable during this period to prevent accidental cancel.

Properties ​

NameDeclarationDescription
elapsedTimepublic float elapsedTime { get; }
isAlivepublic bool isAlive { get; }

Methods ​

AddOnCancel(Action) ​

csharp
public Channel AddOnCancel(Action callback)

Parameters:

NameTypeDescription
callbackSystem.Action

Returns: Channel

AddOnComplete(Action) ​

csharp
public Channel AddOnComplete(Action callback)

Parameters:

NameTypeDescription
callbackSystem.Action

Returns: Channel

AddOnTick(Action<float>) ​

csharp
public Channel AddOnTick(Action<float> callback)

Parameters:

NameTypeDescription
callbackSystem.Action&lt;T&gt;&lt;float&gt;

Returns: Channel

AddValidation(IBinaryEntityValidator, Entity) ​

Adds an binary entity validation for this channel. This channel will fail if any of the added validators evaluates to false.

csharp
public Channel AddValidation(IBinaryEntityValidator validator, Entity entity)

Parameters:

NameTypeDescription
validatorIBinaryEntityValidator
entityEntity

Returns: Channel

AddValidation(IEntityValidator) ​

Adds an entity validation for this channel. This channel will fail if any of the added validators evaluates to false.

csharp
public Channel AddValidation(IEntityValidator validator)

Parameters:

NameTypeDescription
validatorIEntityValidator

Returns: Channel

Cancel() ​

Cancel this channel next channel update.

csharp
public Channel Cancel()

Returns: Channel

Complete() ​

Complete this channel next channel update.

csharp
public Channel Complete()

Returns: Channel

Dispatch(Entity) ​

Dispatch this channel.

csharp
public Channel Dispatch(Entity e)

Parameters:

NameTypeDescription
eEntity

Returns: Channel

Maintained by the Shape of Dreams Modding Community