Initial commit

This commit is contained in:
2026-05-11 20:48:41 +03:00
commit e35e9a07d5
229 changed files with 82642 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
using System;
using UnityEngine;
[RequireComponent(typeof(TowerHealth))]
public class Tower : MonoBehaviour
{
private TowerHealth _towerHealth;
private void Start()
{
_towerHealth = GetComponent<TowerHealth>();
}
private void OnTriggerEnter(Collider other)
{
if (other.TryGetComponent(out Enemy enemy))
_towerHealth.TakeDamage(enemy.Damage);
}
}