22 lines
478 B
C#
22 lines
478 B
C#
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Core structure that players must defend.
|
|
/// Uses HealthComponent for health management.
|
|
/// </summary>
|
|
[RequireComponent(typeof(HealthComponent))]
|
|
public class Core : MonoBehaviour
|
|
{
|
|
private HealthComponent _health;
|
|
|
|
void Awake()
|
|
{
|
|
_health = GetComponent<HealthComponent>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Get the health component for direct access.
|
|
/// </summary>
|
|
public HealthComponent Health => _health;
|
|
}
|