건설 모드에서 클릭이 잘 작동하지 않는 문제 수정

건설 모드 UI가 클릭되어 건설되지 않는 문제 수정
JMO Asset 위치 조정
Tower, Monster, Creep의 Hit/Destroy FX Prefab 설정 (Template Level)
Tower에 체력바 추가 (최초 건설 시, 체력 변경 시 등장)
Tower 관련 디버깅 로그 정리
건설 토대의 사이즈가 비정상적인 문제 수정
This commit is contained in:
2026-02-25 01:41:58 +09:00
parent 3dabf9f9a4
commit f3923079a4
1047 changed files with 897 additions and 373 deletions

View File

@@ -180,14 +180,9 @@ namespace Northbound
{
if (!IsServer) return;
ulong previousOwner = _ownerId.Value;
TeamType previousTeam = _team.Value;
_ownerId.Value = newOwnerId;
_team.Value = newTeam;
Debug.Log($"<color=yellow>[Building] {buildingData?.buildingName ?? ""} 소유권 변경: {previousOwner} → {newOwnerId}, 팀: {TeamManager.GetTeamName(previousTeam)} → {TeamManager.GetTeamName(newTeam)}</color>");
// 시야 제공자 재등록 (소유자가 바뀌었으므로)
if (buildingData != null && buildingData.providesVision)
{
@@ -212,7 +207,6 @@ namespace Northbound
{
OnTeamChanged?.Invoke(newValue);
UpdateTeamVisuals();
Debug.Log($"<color=cyan>[Building] {buildingData?.buildingName ?? ""} 팀 변경: {TeamManager.GetTeamName(previousValue)} → {TeamManager.GetTeamName(newValue)}</color>");
}
private void UpdateTeamVisuals()
@@ -260,7 +254,6 @@ namespace Northbound
// 무적 건물
if (buildingData != null && buildingData.isIndestructible)
{
Debug.Log($"<color=yellow>[Building] {buildingData.buildingName}은(는) 무적입니다.</color>");
return;
}
@@ -271,12 +264,11 @@ namespace Northbound
// 공격자의 팀 확인 (팀 공격 방지)
var attackerObj = NetworkManager.Singleton.SpawnManager.SpawnedObjects[attackerId];
var attackerTeamMember = attackerObj?.GetComponent<ITeamMember>();
if (attackerTeamMember != null)
{
if (!TeamManager.CanAttack(attackerTeamMember, this))
{
Debug.Log($"<color=yellow>[Building] {TeamManager.GetTeamName(attackerTeamMember.GetTeam())} 팀은 {TeamManager.GetTeamName(_team.Value)} 팀을 공격할 수 없습니다.</color>");
return;
}
}
@@ -285,8 +277,6 @@ namespace Northbound
int actualDamage = Mathf.Min(damage, _currentHealth.Value);
_currentHealth.Value -= actualDamage;
Debug.Log($"<color=red>[Building] {buildingData?.buildingName ?? ""} ({TeamManager.GetTeamName(_team.Value)})이(가) {actualDamage} 데미지를 받았습니다. 남은 체력: {_currentHealth.Value}/{buildingData?.maxHealth ?? 100}</color>");
// 데미지 이펙트
ShowDamageEffectClientRpc();
@@ -315,8 +305,6 @@ namespace Northbound
if (!IsServer)
return;
Debug.Log($"<color=red>[Building] {buildingData?.buildingName ?? ""} ({TeamManager.GetTeamName(_team.Value)})이(가) 파괴되었습니다! (공격자: {attackerId})</color>");
// 파괴 이벤트 발생
OnDestroyed?.Invoke();
NotifyDestroyedClientRpc();
@@ -361,8 +349,6 @@ namespace Northbound
int healAmount = Mathf.Min(amount, buildingData.maxHealth - _currentHealth.Value);
_currentHealth.Value += healAmount;
Debug.Log($"<color=green>[Building] {buildingData.buildingName}이(가) {healAmount} 회복되었습니다. 현재 체력: {_currentHealth.Value}/{buildingData.maxHealth}</color>");
}
/// <summary>
@@ -398,6 +384,11 @@ namespace Northbound
if (_healthBar != null)
return;
if (healthBarPrefab == null)
{
return;
}
GameObject healthBarObj = Instantiate(healthBarPrefab, transform);
_healthBar = healthBarObj.GetComponent<BuildingHealthBar>();
@@ -411,7 +402,9 @@ namespace Northbound
{
if (_healthBar != null)
{
_healthBar.UpdateHealth(_currentHealth.Value, GetMaxHealth());
int current = _currentHealth.Value;
int max = GetMaxHealth();
_healthBar.UpdateHealth(current, max);
}
OnHealthChanged?.Invoke(_currentHealth.Value, GetMaxHealth());