fix upgrades

This commit is contained in:
myondev 2026-03-03 09:16:19 -08:00
parent d8c49317a3
commit 5dcbd3c313
17 changed files with 477 additions and 83 deletions

View file

@ -1,3 +1,4 @@
using System;
using UnityEngine;
public class Entity : MonoBehaviour
@ -11,6 +12,7 @@ public class Entity : MonoBehaviour
[Header("Stats")]
public float health;
public float maxHealth;
[Header("Movement")]
[SerializeField] private bool isFacingRight;
[SerializeField] protected Rigidbody2D rb;
@ -37,7 +39,7 @@ public class Entity : MonoBehaviour
rb.linearVelocity = moveDirection * speed;
}
}
public void TakeDamage(float damage)
public virtual void TakeDamage(float damage)
{
health -= damage;
if (health < 0)