v0.13.0.11

This commit is contained in:
Juan Pablo Arce
2021-04-22 13:11:21 -03:00
parent 245b48c3a3
commit dde6212577
52 changed files with 3196 additions and 3507 deletions
@@ -640,6 +640,12 @@ namespace Barotrauma
return children.Contains(rectT) || (recursive && children.Any(c => c.IsParentOf(rectT)));
}
public bool IsChildOf(RectTransform rectT, bool recursive = true)
{
if (Parent == null) { return false; }
return Parent == rectT || (recursive && Parent.IsChildOf(rectT));
}
public void ClearChildren()
{
children.ForEachMod(c => c.Parent = null);