Implement health modification on enemy kill; add HealOnKillModifier and update death behavior
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user