건설 인터랙션 관련 버그 수정 및 건설 데이터 구조 개선

건설 인터랙션 시 움직이지 못하는 문제 수정
2개로 분리되어 있던 타워 데이터를 하나로 통합
 - 대신 타워가 아닌 건물도 공격력 등을 정의할 수 있음
This commit is contained in:
2026-02-01 16:09:57 +09:00
parent 7927dab72f
commit 4200288fae
24 changed files with 235 additions and 337 deletions

View File

@@ -1,13 +1,14 @@
using System;
using Unity.Netcode;
using UnityEngine;
using Northbound.Data;
namespace Northbound
{
public class Building : NetworkBehaviour, IDamageable, IVisionProvider, ITeamMember
{
[Header("References")]
public BuildingData buildingData;
public TowerData buildingData;
[Header("Runtime Info")]
public Vector3Int gridPosition;
@@ -152,7 +153,7 @@ namespace Northbound
/// <summary>
/// 건물 초기화 (BuildingManager가 동적 생성 시 호출)
/// </summary>
public void Initialize(BuildingData data, Vector3Int gridPos, int rot, ulong ownerId, TeamType team = TeamType.Player)
public void Initialize(TowerData data, Vector3Int gridPos, int rot, ulong ownerId, TeamType team = TeamType.Player)
{
buildingData = data;
gridPosition = gridPos;
@@ -462,7 +463,7 @@ namespace Northbound
#region Grid Bounds
/// <summary>
/// Gets the grid-based bounds (from BuildingData width/length/height)
/// Gets the grid-based bounds (from TowerData width/length/height)
/// This is used for placement validation, NOT the actual collider bounds
/// Bounds are slightly shrunk to allow adjacent buildings to touch
/// </summary>