Unstable 0.16.0.0

This commit is contained in:
Markus Isberg
2022-01-14 01:28:24 +09:00
parent d9baeaa2e1
commit 7d6421a548
237 changed files with 6430 additions and 2205 deletions
@@ -637,7 +637,15 @@ namespace Barotrauma
public bool IsParentOf(RectTransform rectT, bool recursive = true)
{
return children.Contains(rectT) || (recursive && children.Any(c => c.IsParentOf(rectT)));
if (children.Contains(rectT)) { return true; }
if (recursive)
{
foreach (var child in children)
{
if (child.IsParentOf(rectT)) { return true; }
}
}
return false;
}
public bool IsChildOf(RectTransform rectT, bool recursive = true)