Struct ConditionTask
The condition task executes its child based on an internal condition that can be controlled externally.
Namespace: Unity.Kinematica
Syntax
[Data("Condition", "#2A3756", DataType.Flag.None)]
public struct ConditionTask : Task, GenericTask<ConditionTask>
Fields
value
Denotes the internal state of the condition task.
Declaration
public BlittableBool value
Field Value
Type | Description |
---|---|
BlittableBool |
Properties
self
Declaration
public Identifier<ConditionTask> self { get; set; }
Property Value
Type | Description |
---|---|
Identifier<ConditionTask> |
Implements
Methods
Execute()
Execute method for the condition task.
Declaration
public Result Execute()
Returns
Type | Description |
---|---|
Result | Result of the condition task. |
Implements
Remarks
The condition task executes its first child if its internal value is set to true. In this case the condition task returns the status of the child task, Failure otherwise.
ExecuteSelf(ref TaskPointer)
Surrogate method for automatic task execution.
Declaration
public static Result ExecuteSelf(ref TaskPointer self)
Parameters
Type | Name | Description |
---|---|---|
TaskPointer | self | Task reference that is supposed to be executed. |
Returns
Type | Description |
---|---|
Result | Result of the task execution. |
Operators
Implicit(ConditionTask to Boolean)
Implicit cast operator that allows to convert a condition task to a bool.
Declaration
public static implicit operator bool (ConditionTask task)
Parameters
Type | Name | Description |
---|---|---|
ConditionTask | task |
Returns
Type | Description |
---|---|
Boolean |
Implicit(ConditionTask to Identifier<ConditionTask>)
Implicit cast operator that allows to convert a condition task into a typed identifier.
Declaration
public static implicit operator Identifier<ConditionTask>(ConditionTask task)
Parameters
Type | Name | Description |
---|---|---|
ConditionTask | task |
Returns
Type | Description |
---|---|
Identifier<ConditionTask> |
Implicit(ConditionTask to MemoryIdentifier)
Implicit cast operator that allows to convert a condition task into an identifier.
Declaration
public static implicit operator MemoryIdentifier(ConditionTask task)
Parameters
Type | Name | Description |
---|---|---|
ConditionTask | task |
Returns
Type | Description |
---|---|
MemoryIdentifier |