added reload animation and feature

This commit is contained in:
Mausham
2025-12-30 16:22:49 -08:00
parent 1a61f3c506
commit 0ec69f66c9
16 changed files with 27895 additions and 26896 deletions

View File

@@ -6,6 +6,7 @@ namespace Darkmatter.Presentation
public class Enemy : MonoBehaviour, IDamageable
{
public float health = 100f;
public Animator enemyAnimator;
public void Die()
{
Debug.Log("Dead");
@@ -15,6 +16,8 @@ namespace Darkmatter.Presentation
public void TakeDamage(float damage)
{
health -= damage;
enemyAnimator.SetLayerWeight(1, 1);
enemyAnimator.SetTrigger("Hit");
if (health <= 0) Die();
Debug.Log("Damage Taken");
}