meta파일 추가 및 gitignore에서 제거
This commit is contained in:
2
Assets/Scripts/Tower/AreaTowerAttack.cs.meta
Normal file
2
Assets/Scripts/Tower/AreaTowerAttack.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: acf7c1949566efb448f1f1f2622012a2
|
||||
@@ -52,11 +52,23 @@ public class ConstructionSite : MonoBehaviour
|
||||
|
||||
private void CompleteBuild()
|
||||
{
|
||||
// 1. 실제 타워 생성
|
||||
GameObject turret = Instantiate(_finalTurretPrefab, transform.position, transform.rotation);
|
||||
GameObject finalTurret = Instantiate(_finalPrefab, transform.position, Quaternion.identity);
|
||||
BuildManager.Instance.AlignToGround(finalTurret, 0f);
|
||||
|
||||
// 2. 생성된 타워의 크기를 저장해둔 사이즈로 변경!
|
||||
turret.transform.localScale = new Vector3(_size.x, 1f, _size.y);
|
||||
// [추가] 새로 생긴 터널의 노드들에게 주변 연결을 찾으라고 명령
|
||||
TunnelNode[] newNodes = finalTurret.GetComponentsInChildren<TunnelNode>();
|
||||
foreach (var node in newNodes)
|
||||
{
|
||||
node.FindNeighborNode();
|
||||
}
|
||||
|
||||
// [추가] 주변에 있던 기존 노드들도 새 노드를 찾도록 주변 검색 실행
|
||||
Collider[] neighbors = Physics.OverlapSphere(transform.position, 5f, LayerMask.GetMask("Tunnel"));
|
||||
foreach (var col in neighbors)
|
||||
{
|
||||
TunnelNode neighborNode = col.GetComponent<TunnelNode>();
|
||||
if (neighborNode != null) neighborNode.FindNeighborNode();
|
||||
}
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
2
Assets/Scripts/Tower/ConstructionSite.cs.meta
Normal file
2
Assets/Scripts/Tower/ConstructionSite.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bbda59cbb9721e419a846e7db104508
|
||||
2
Assets/Scripts/Tower/ExplosiveProjectile.cs.meta
Normal file
2
Assets/Scripts/Tower/ExplosiveProjectile.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edc9774450b461949881473493df9118
|
||||
2
Assets/Scripts/Tower/Projectile.cs.meta
Normal file
2
Assets/Scripts/Tower/Projectile.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b0881e69aae16f4e87dd19a210a026b
|
||||
2
Assets/Scripts/Tower/TowerAttack.cs.meta
Normal file
2
Assets/Scripts/Tower/TowerAttack.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a2261bfcc98da54f99ea109f6fd9645
|
||||
2
Assets/Scripts/Tower/TowerRangeOverlay.cs.meta
Normal file
2
Assets/Scripts/Tower/TowerRangeOverlay.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1de87143b4c1b934fa3178ed813be3b3
|
||||
Reference in New Issue
Block a user