상호작용 시 모달 UI 추가(임시)
기타 디버깅 로그 제거
This commit is contained in:
@@ -211,8 +211,6 @@ namespace Northbound
|
||||
}
|
||||
|
||||
GenerateCreepCamps();
|
||||
|
||||
Debug.Log($"[MapGenerator] Map generation complete!");
|
||||
}
|
||||
|
||||
#region Resource Generation
|
||||
@@ -233,7 +231,6 @@ namespace Northbound
|
||||
{
|
||||
_generatedResources = resources;
|
||||
success = true;
|
||||
Debug.Log($"[MapGenerator] Successfully generated resources on attempt {attempt + 1}");
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -401,8 +398,6 @@ namespace Northbound
|
||||
{
|
||||
_generatedResources[i].finalProduction *= _globalProductionMultiplier;
|
||||
}
|
||||
|
||||
Debug.Log($"[MapGenerator] Resource fallback layout generated. Global multiplier: {_globalProductionMultiplier:F2}");
|
||||
}
|
||||
|
||||
private void SpawnResources()
|
||||
@@ -452,15 +447,12 @@ namespace Northbound
|
||||
{
|
||||
if (obstacles.Count == 0)
|
||||
{
|
||||
Debug.Log("[MapGenerator] No obstacles configured, skipping obstacle generation.");
|
||||
return;
|
||||
}
|
||||
|
||||
int totalSpawned = 0;
|
||||
int targetCount = Mathf.RoundToInt(maxTotalObstacles * obstacleDensity);
|
||||
|
||||
Debug.Log($"[MapGenerator] Starting obstacle generation. Target: {targetCount}, Density: {obstacleDensity}");
|
||||
|
||||
foreach (var obstacle in obstacles)
|
||||
{
|
||||
if (obstacle.prefab == null)
|
||||
@@ -475,7 +467,6 @@ namespace Northbound
|
||||
if (TrySpawnObstacle(obstacle))
|
||||
{
|
||||
totalSpawned++;
|
||||
Debug.Log($"[MapGenerator] Spawned min required obstacle: {obstacle.prefab.name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -513,8 +504,6 @@ namespace Northbound
|
||||
consecutiveFailures++;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"[MapGenerator] Spawned {totalSpawned} obstacles (target: {targetCount}). Consecutive failures: {consecutiveFailures}");
|
||||
}
|
||||
|
||||
private bool TrySpawnObstacle(ObstacleEntry obstacleEntry)
|
||||
@@ -697,7 +686,7 @@ namespace Northbound
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"[MapGenerator] Starting creep camp generation. Resources: {_generatedResources.Length}, Additional camps: {additionalCreepCampCount}");
|
||||
|
||||
|
||||
int totalCampsSpawned = 0;
|
||||
|
||||
@@ -707,7 +696,6 @@ namespace Northbound
|
||||
if (campPosition != Vector3.zero)
|
||||
{
|
||||
float strength = CalculateCampStrength(_generatedResources[i].position.y, isResourceCamp: true);
|
||||
Debug.Log($"[MapGenerator] Spawning resource camp {i + 1} for resource at {_generatedResources[i].position}, position: {campPosition}, strength: {strength:F2} (with bonus)");
|
||||
SpawnCreepCamp(campPosition, strength);
|
||||
_creepCampPositions.Add(campPosition);
|
||||
totalCampsSpawned++;
|
||||
@@ -721,29 +709,22 @@ namespace Northbound
|
||||
if (campPosition != Vector3.zero)
|
||||
{
|
||||
float strength = CalculateCampStrength(campPosition.z, isResourceCamp: false);
|
||||
Debug.Log($"[MapGenerator] Spawning additional camp {i + 1}, position: {campPosition}, strength: {strength:F2}");
|
||||
SpawnCreepCamp(campPosition, strength);
|
||||
_creepCampPositions.Add(campPosition);
|
||||
additionalSpawned++;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"[MapGenerator] Spawned {totalCampsSpawned} resource-based camps and {additionalSpawned} additional camps. Total: {totalCampsSpawned + additionalSpawned}");
|
||||
}
|
||||
|
||||
private void LoadCreepPrefabs()
|
||||
{
|
||||
Debug.Log($"[MapGenerator] LoadCreepPrefabs called, current count: {_creepPrefabs.Count}");
|
||||
|
||||
if (_creepPrefabs.Count > 0)
|
||||
{
|
||||
Debug.Log($"[MapGenerator] Skipping load, already have {_creepPrefabs.Count} prefabs");
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
string[] prefabGuids = UnityEditor.AssetDatabase.FindAssets("t:Prefab", new[] { "Assets/Prefabs/Creep" });
|
||||
Debug.Log($"[MapGenerator] Found {prefabGuids.Length} prefabs in Assets/Prefabs/Creep/");
|
||||
_creepPrefabs.Clear();
|
||||
|
||||
foreach (string guid in prefabGuids)
|
||||
@@ -754,18 +735,13 @@ namespace Northbound
|
||||
if (prefab != null && prefab.GetComponent<CreepDataComponent>() != null)
|
||||
{
|
||||
_creepPrefabs.Add(prefab);
|
||||
Debug.Log($"[MapGenerator] Added creep prefab: {prefab.name}");
|
||||
}
|
||||
}
|
||||
#else
|
||||
Debug.LogWarning("[MapGenerator] Creep prefabs not loaded in build. Please assign creep prefabs manually in Inspector.");
|
||||
#endif
|
||||
|
||||
if (_creepPrefabs.Count > 0)
|
||||
{
|
||||
Debug.Log($"[MapGenerator] Loaded {_creepPrefabs.Count} creep prefabs from Assets/Prefabs/Creep/");
|
||||
}
|
||||
else
|
||||
if (_creepPrefabs.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("[MapGenerator] No creep prefabs loaded!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user