public SGameObject FindChild(SFrameWork.Condition condition) { if (condition == null) { return(null); } foreach (var i in _children) { if (condition(i)) { return(i); } } return(null); }
public List <SGameObject> FindChildren(SFrameWork.Condition condition) { if (condition == null) { return(null); } List <SGameObject> rets = new List <SGameObject>(); foreach (var i in _children) { if (condition(i)) { rets.Add(i); } } return(rets); }