everything is working!!

This commit is contained in:
2024-06-09 11:56:57 +01:00
parent 91ca4abbf3
commit a113700afc
4 changed files with 52 additions and 52 deletions

View File

@@ -177,14 +177,14 @@ public class CameraManager : MonoBehaviour
float randomIndex = Random.Range(0f, totalWeight);
Debug.Log($"Random Number: {randomIndex}");
Debug.Log($"Random Number: {randomIndex}, Size: {shuffledList.Count}");
GameObject selectedCamera = null;
int selectedCameraIndex = 0;
for (int i = 0; i < shuffledList.Count; i++){
randomIndex -= m_CameraSettings[shuffledList[i]].cameraWeight;
Debug.Log($"Adj Index: {randomIndex}, Weight: {totalWeight}, {m_CameraSettings[shuffledList[i]].cameraWeight}, Name: {m_CameraObjects[shuffledList[i]].name}");
//Debug.Log($"Adj Index: {randomIndex}, Weight: {totalWeight}, {m_CameraSettings[shuffledList[i]].cameraWeight}, Name: {m_CameraObjects[shuffledList[i]].name}");
if(randomIndex <= 0){
// Activate Selected Camera
selectedCamera = m_CameraObjects[shuffledList[i]];