타워 선택 건설 및 몹 웨이브 생성

Defence용 Scene 별도 생성
This commit is contained in:
2026-01-13 01:20:44 +09:00
parent 5a9fc719de
commit 022bc48bc5
26 changed files with 2768 additions and 167 deletions

View File

@@ -5,14 +5,15 @@ using System;
public class Gate : MonoBehaviour, IDamageable
{
[SerializeField] private float maxHealth = 50f;
private float _currentHealth;
[SerializeField] private float currentHealth = 50f;
private float CurrentHealth;
void Awake() => _currentHealth = maxHealth;
void Awake() => currentHealth = maxHealth;
public void TakeDamage(float amount)
{
_currentHealth -= amount;
if (_currentHealth <= 0)
currentHealth -= amount;
if (currentHealth <= 0)
gameObject.SetActive(false);
}
}