Exemple #1
0
 bool check_containsornot(List <RoomMeta> linkedroomlist, RoomMeta roomMeta_to_check)
 {
     for (int i = 0; i < linkedroomlist.Count; i++)
     {
         if (linkedroomlist[i].GetHashCode() == roomMeta_to_check.GetHashCode())
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #2
0
 void find_linkedroom(List <RoomMeta> linkedroomlist, RoomMeta roomMetanow, List <RoomMeta> sourcelist)
 {
     linkedroomlist.Add(roomMetanow);
     for (int i = 0; i < sourcelist.Count; i++)
     {
         if (sourcelist[i].GetHashCode() == roomMetanow.GetHashCode())
         {
             sourcelist.RemoveAt(i);
             break;
         }
     }
     for (int i = 0; i < roomMetanow.UDLR_room.Length; i++)
     {
         if (roomMetanow.UDLR_room[i] != null && !check_containsornot(linkedroomlist, roomMetanow.UDLR_room[i]))
         {
             find_linkedroom(linkedroomlist, roomMetanow.UDLR_room[i], sourcelist);
         }
     }
 }//링크된방을 다찾으니까 계단을 잇기 전에 사용하는게 권장됨.