示例#1
0
 public void retrive_ex(mario_bound b, ref List <mario_obj> objs, int type)
 {
     if (nodes[0] != null)
     {
         int index = get_index(b);
         if (index != -1)
         {
             nodes[index].retrive_ex(b, ref objs, type);
         }
         else
         {
             List <mario_bound> arr = bound.carve(b);
             for (int i = 0; i < arr.Count; ++i)
             {
                 if (!arr[i].bs_yx)
                 {
                     continue;
                 }
                 index = get_index(arr[i]);
                 if (index != -1)
                 {
                     nodes[index].retrive_ex(arr[i], ref objs, type);
                 }
             }
         }
     }
     objs.AddRange(objects[type]);
 }