Class ActiveWaitConditionWorkAction
A work action to wait an event for a time.
Inherited Members
Namespace: Evergine.Components.WorkActions
Assembly: Evergine.Components.dll
Syntax
public class ActiveWaitConditionWorkAction : WorkAction, IUpdatableWorkAction, IWorkAction
Constructors
ActiveWaitConditionWorkAction(IWorkAction, Func<bool>, int)
Initializes a new instance of the ActiveWaitConditionWorkAction class.
Declaration
public ActiveWaitConditionWorkAction(IWorkAction parent, Func<bool> breakPredicate, int eventCount = 1)
Parameters
Type | Name | Description |
---|---|---|
IWorkAction | parent | The parent action. |
Func<bool> | breakPredicate | The condition predicate. |
int | eventCount | The event count. |
ActiveWaitConditionWorkAction(Func<bool>, Scene, int)
Initializes a new instance of the ActiveWaitConditionWorkAction class.
Declaration
public ActiveWaitConditionWorkAction(Func<bool> breakPredicate, Scene scene = null, int eventCount = 1)
Parameters
Type | Name | Description |
---|---|---|
Func<bool> | breakPredicate | The condition predicate. |
Scene | scene | The scene. |
int | eventCount | The event count. |
Properties
EventCount
Gets the event count.
Declaration
public int EventCount { get; }
Property Value
Type | Description |
---|---|
int |
Predicate
Gets the predicate.
Declaration
public Func<bool> Predicate { get; }
Property Value
Type | Description |
---|---|
Func<bool> |
Methods
PerformRun()
Perform Run actions.
Declaration
protected override void PerformRun()
Overrides
PerformSkip()
Skip the action.
Declaration
protected override bool PerformSkip()
Returns
Type | Description |
---|---|
bool | A value indicating it the work action is successfully skipped. |
Overrides
Update(TimeSpan)
Update the work action.
Declaration
public void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The current game time. |