mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-18 17:34:45 +01:00
25 lines
613 B
C#
25 lines
613 B
C#
namespace BehaviorDesigner.Runtime.Tasks
|
|
{
|
|
[TaskIcon("{SkinColor}ParallelSelectorIcon.png")]
|
|
[TaskDescription("Only count on the first child!! Run all Children at the same time")]
|
|
public class ParallelAttach : ParallelSelector
|
|
{
|
|
public override TaskStatus OverrideStatus(TaskStatus status)
|
|
{
|
|
bool flag = true;
|
|
if (executionStatus.Length > 0)
|
|
{
|
|
if (executionStatus[0] == TaskStatus.Running)
|
|
{
|
|
flag = false;
|
|
}
|
|
else if (executionStatus[0] == TaskStatus.Success)
|
|
{
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
return flag ? TaskStatus.Failure : TaskStatus.Running;
|
|
}
|
|
}
|
|
}
|