fixed generation issue

This commit is contained in:
Xaver Drabik 2024-12-31 12:48:13 +01:00
parent c94dbd92b8
commit 4a0662761a
20 changed files with 36 additions and 47 deletions

BIN
Blender/World/1d/d-base.blend (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -33,7 +33,7 @@ ModelImporter:
isReadable: 0 isReadable: 0
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 2
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
useSRGBMaterialColor: 1 useSRGBMaterialColor: 1
@ -88,7 +88,7 @@ ModelImporter:
armStretch: 0.05 armStretch: 0.05
legStretch: 0.05 legStretch: 0.05
feetSpacing: 0 feetSpacing: 0
globalScale: 1 globalScale: 0.02
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0 hasTranslationDoF: 0
hasExtraRoot: 0 hasExtraRoot: 0

View File

@ -259,9 +259,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
width: 20 width: 20
height: 20 height: 20
maxRooms: 15 maxRooms: 7
floorPrefab: {fileID: 0}
wallPrefab: {fileID: 1192638862}
room1DPrefabs: room1DPrefabs:
- {fileID: 919132149155446097, guid: c7a21429b5432184bb062b9790dce88a, type: 3} - {fileID: 919132149155446097, guid: c7a21429b5432184bb062b9790dce88a, type: 3}
- {fileID: 919132149155446097, guid: a90edcd3828d0044581a3aa1743360a7, type: 3} - {fileID: 919132149155446097, guid: a90edcd3828d0044581a3aa1743360a7, type: 3}

View File

@ -10,8 +10,6 @@ public class LevelManager : MonoBehaviour
public int width = 20; public int width = 20;
public int height = 20; public int height = 20;
public int maxRooms = 15; // Maximum number of rooms to generate public int maxRooms = 15; // Maximum number of rooms to generate
public GameObject floorPrefab;
public GameObject wallPrefab;
public List<GameObject> room1DPrefabs; public List<GameObject> room1DPrefabs;
public List<GameObject> room2DPrefabs; public List<GameObject> room2DPrefabs;
public List<GameObject> room3DPrefabs; public List<GameObject> room3DPrefabs;
@ -123,11 +121,11 @@ void RenderDungeon()
{ {
room += "d"; room += "d";
} }
if ((x - 1 >= 0) && (grid[x-1, y] == 1)) if ((x + 1 < grid.GetLength(0)) && (grid[x+1, y] == 1))
{ {
room += "l"; room += "l";
} }
if ((x + 1 < grid.GetLength(0)) && (grid[x+1, y] == 1)) if ((x - 1 >= 0) && (grid[x-1, y] == 1))
{ {
room += "r"; room += "r";
} }
@ -161,7 +159,7 @@ void AddRoom(string roomName, int roomDimension, Vector2 roomPosition)
default: default:
return; return;
} }
for (int i = 0; i < roomPrefabs.Count; i++) for (int i = 0; i < roomPrefabs.Count; i++)
{ {
if (roomPrefabs[i].name == roomName+"-base") if (roomPrefabs[i].name == roomName+"-base")

View File

@ -38,13 +38,6 @@ private IEnumerator PlayWindSounds()
// Start crossfade // Start crossfade
StartCoroutine(Crossfade(activeSource, nextSource, crossfadeDuration)); StartCoroutine(Crossfade(activeSource, nextSource, crossfadeDuration));
// Wait until near the end of the active clip
print("--------");
print(nextSource.clip.name);
print(nextSource.clip.length);
print(crossfadeDuration);
print("--------");
yield return new WaitForSeconds(nextSource.clip.length - crossfadeDuration); yield return new WaitForSeconds(nextSource.clip.length - crossfadeDuration);