액션 및 인터랙션 시 장비를 착용할 수 있도록 함. 코드 개선 추가
This commit is contained in:
@@ -178,7 +178,7 @@ namespace Northbound
|
||||
return "[E] 건설하기";
|
||||
|
||||
float percentage = (_currentProgress.Value / buildingData.requiredWorkAmount) * 100f;
|
||||
return $"[E] 건설하기 ({percentage:F0}%)";
|
||||
return $"[E] {buildingData.buildingName} 건설 ({percentage:F0}%)";
|
||||
}
|
||||
|
||||
public string GetInteractionAnimation()
|
||||
@@ -193,7 +193,7 @@ namespace Northbound
|
||||
return "";
|
||||
}
|
||||
|
||||
public InteractionEquipmentData GetEquipmentData()
|
||||
public EquipmentData GetEquipmentData()
|
||||
{
|
||||
// BuildingData에 건설 도구가 정의되어 있으면 반환
|
||||
if (buildingData != null && buildingData.constructionEquipment != null)
|
||||
@@ -234,12 +234,15 @@ namespace Northbound
|
||||
// 플레이어의 NetworkObject 찾기
|
||||
if (NetworkManager.Singleton != null && NetworkManager.Singleton.SpawnManager != null)
|
||||
{
|
||||
if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(playerId, out NetworkObject playerNetObj))
|
||||
if (NetworkManager.Singleton.ConnectedClients.TryGetValue(playerId, out var client))
|
||||
{
|
||||
var teamMember = playerNetObj.GetComponent<ITeamMember>();
|
||||
if (teamMember != null)
|
||||
if (client.PlayerObject != null)
|
||||
{
|
||||
return teamMember.GetTeam();
|
||||
var teamMember = client.PlayerObject.GetComponent<ITeamMember>();
|
||||
if (teamMember != null)
|
||||
{
|
||||
return teamMember.GetTeam();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user