지하 생성 및 터널 구조 개선
This commit is contained in:
@@ -14,6 +14,8 @@ public class ConstructionSite : NetworkBehaviour
|
||||
if (!IsServer) return;
|
||||
_syncTurretIndex.Value = index;
|
||||
_gridPos = pos;
|
||||
|
||||
// BuildManager로부터 데이터 참조
|
||||
_targetBuildTime = BuildManager.Instance.GetTurretData(index).buildTime;
|
||||
}
|
||||
|
||||
@@ -35,8 +37,8 @@ public class ConstructionSite : NetworkBehaviour
|
||||
_isCompleted = true;
|
||||
var data = BuildManager.Instance.GetTurretData(_syncTurretIndex.Value);
|
||||
|
||||
// [중요] 저장된 그리드 좌표로부터 정확한 월드 좌표 복원
|
||||
Vector3 finalPos = BuildManager.Instance.GridToWorld(_gridPos);
|
||||
// 고스트가 있던 그 위치 그대로 생성
|
||||
Vector3 finalPos = transform.position;
|
||||
GameObject finalObj = Instantiate(data.finalPrefab, finalPos, Quaternion.identity);
|
||||
|
||||
finalObj.GetComponent<NetworkObject>().Spawn();
|
||||
|
||||
Reference in New Issue
Block a user