타워 공격 기능 추가

각 타워 외형 변경 및 투사체 생성
This commit is contained in:
2026-01-14 01:45:59 +09:00
parent b346bd0d7b
commit 745166803c
15 changed files with 2033 additions and 408 deletions

View File

@@ -20,7 +20,7 @@ public class ConstructionSite : MonoBehaviour
_size = size; // 사이즈 저장
// 토대 자체의 크기 조절 (BuildManager에서 해도 되지만 여기서 하면 더 확실합니다)
transform.localScale = new Vector3(size.x, 5f, size.y);
transform.localScale = new Vector3(size.x, 1f, size.y);
// UI 생성 및 초기화
if (uiPrefab != null)
@@ -29,6 +29,7 @@ public class ConstructionSite : MonoBehaviour
_progressSlider = uiObj.GetComponentInChildren<Slider>();
if (_progressSlider != null)
{
_progressSlider.transform.localScale = Vector3.one; // 슬라이더 크기 조절
_progressSlider.maxValue = 1f;
_progressSlider.value = 0f;
}
@@ -58,7 +59,7 @@ public class ConstructionSite : MonoBehaviour
GameObject turret = Instantiate(_finalTurretPrefab, transform.position, transform.rotation);
// 2. 생성된 타워의 크기를 저장해둔 사이즈로 변경!
turret.transform.localScale = new Vector3(_size.x, 5f, _size.y);
turret.transform.localScale = new Vector3(_size.x, 1f, _size.y);
Destroy(gameObject);
}