예제 #1
0
    public GameObject GetRoomTemplate(DoorOpenings firstDir, DoorOpenings secondDir)
    {
        RoomsTypes neededType = GetRoomType(firstDir, secondDir);

        GetRoomTemplate(neededType);
        Debug.LogError("Get Room Prefab error for firstDir " + firstDir + " secondDir " + secondDir);
        return(null);
    }
예제 #2
0
 private GameObject GetRoomTemplate(RoomsTypes roomType)
 {
     for (int i = 0; i < roomsTemplates.Length; i++)
     {
         if (roomsTemplates[i].roomType == roomType)
         {
             return(roomsTemplates[i].roomPrefab);
         }
     }
     Debug.LogError("Get Room Prefab error for type " + roomType);
     return(null);
 }