InputComponent字段值不正确
Posted: 2024/09/18 09:33
1.3.0版本中,EvaluateComponent作为行为树的Decorator时InputComponent字段值不正确
Support Forum
https://logictoolkit-forum.caitsithware.com/
https://logictoolkit-forum.caitsithware.com/viewtopic.php?t=29
1.3.1仍然存在这个Bug
Code: Select all
HashSet<Type> visitedElements = new HashSet<Type>();
Code: Select all
else if (stack.Contains(elementType)
&& visitedElements.Add(elementType))
{
var list = new List<Type>(stack.Reverse());
var index = list.IndexOf(elementType);
stack.Clear();
for (int i = 0; i < index; i++)
{
stack.Push(list[i]);
}
stack.Push(targetType);
for (int i = index; i < list.Count; i++)
{
stack.Push(list[i]);
}
}