Example #1
0
 public SGameObject FindChild(SFrameWork.Condition condition)
 {
     if (condition == null)
     {
         return(null);
     }
     foreach (var i in _children)
     {
         if (condition(i))
         {
             return(i);
         }
     }
     return(null);
 }
Example #2
0
        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);
        }