상호작용 시 모달 UI 추가(임시)
기타 디버깅 로그 제거
This commit is contained in:
@@ -44,7 +44,6 @@ namespace Northbound
|
||||
|
||||
private void OnWorkerCountChanged(int previousValue, int newValue)
|
||||
{
|
||||
Debug.Log($"[WorkerSpawner] 워커 수 변경: {previousValue} → {newValue}");
|
||||
}
|
||||
|
||||
#region IInteractable Implementation
|
||||
@@ -122,16 +121,14 @@ namespace Northbound
|
||||
return;
|
||||
}
|
||||
|
||||
// IMPORTANT: Spawn as server-owned so server can modify worker's NetworkVariables
|
||||
workerNetObj.Spawn();
|
||||
_lastSpawnTime = Time.time;
|
||||
_workerCount.Value++;
|
||||
// IMPORTANT: Spawn as server-owned so server can modify worker's NetworkVariables
|
||||
workerNetObj.Spawn();
|
||||
_lastSpawnTime = Time.time;
|
||||
_workerCount.Value++;
|
||||
|
||||
ShowSpawnEffectClientRpc(spawnPosition);
|
||||
ShowSpawnEffectClientRpc(spawnPosition);
|
||||
|
||||
Debug.Log($"[WorkerSpawner] Worker spawned (server-owned) and assigned to player {playerId} (Total: {_workerCount.Value}/{maxWorkers})");
|
||||
|
||||
ScheduleWorkerAssignment(playerId, workerNetObj.NetworkObjectId);
|
||||
ScheduleWorkerAssignment(playerId, workerNetObj.NetworkObjectId);
|
||||
}
|
||||
|
||||
private void ScheduleWorkerAssignment(ulong playerId, ulong workerNetObjectId)
|
||||
@@ -179,7 +176,6 @@ namespace Northbound
|
||||
if (worker != null)
|
||||
{
|
||||
playerInteraction.assignedWorker = worker;
|
||||
Debug.Log($"[WorkerSpawner] Worker assigned to player {playerId}'s PlayerInteraction");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,15 +195,15 @@ namespace Northbound
|
||||
public string GetInteractionPrompt()
|
||||
{
|
||||
if (_workerCount.Value >= maxWorkers)
|
||||
return $"워커 수 최대 ({_workerCount.Value}/{maxWorkers})";
|
||||
return $"Worker ({_workerCount.Value}/{maxWorkers})";
|
||||
|
||||
float cooldownRemaining = Mathf.Max(0, spawnCooldown - (Time.time - _lastSpawnTime));
|
||||
if (cooldownRemaining > 0)
|
||||
return $"워커 생성 대기 중 ({cooldownRemaining:F1}s)";
|
||||
return $"Waiting Worker... ({cooldownRemaining:F1}s)";
|
||||
|
||||
var coreResourceManager = CoreResourceManager.Instance;
|
||||
if (coreResourceManager != null && !coreResourceManager.CanAfford(recruitmentCost))
|
||||
return $"자원 부족 (필요: {recruitmentCost})";
|
||||
return $"Resource Required: {recruitmentCost})";
|
||||
|
||||
return $"{interactionPrompt} ({_workerCount.Value}/{maxWorkers}) - 비용: {recruitmentCost}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user