Implement health modification on enemy kill; add HealOnKillModifier and update death behavior

This commit is contained in:
2025-07-12 12:57:21 +02:00
parent cb793bcc93
commit c3b1ac9213
22 changed files with 330 additions and 11 deletions

View File

@@ -8,8 +8,14 @@ namespace Weapons
[SerializeField] private GameObject projectilePrefab;
[SerializeField] private Transform firePoint;
public Vector2 Target { get; set; }
public override void Fire()
{
var direction = (Target - (Vector2)firePoint.position).normalized;
firePoint.up = direction;
Debug.DrawLine(firePoint.position, Target, Color.red, 2f);
var projectile = Instantiate(projectilePrefab, firePoint.position, firePoint.rotation);
projectile.TryGetComponent<IDamageInflectorSetup>(out var inflector);