the ability to switch weapons

This commit is contained in:
reisenlol 2026-01-12 23:05:33 -08:00
parent 0722053b84
commit 533f137c48
No known key found for this signature in database
12 changed files with 928 additions and 15 deletions

View file

@ -8,7 +8,7 @@ public class PlayerEntity : Entity
public bool hasAttacked = false;
[Header("Weaponry")]
[SerializeField] private Weapon[] weapons;
private List<Weapon> weaponInstances = new();
[HideInInspector] public List<Weapon> weaponInstances = new();
public Weapon currentWeapon;
[Header("UI")]
[SerializeField] private Transform hpBar;
@ -51,9 +51,9 @@ public class PlayerEntity : Entity
currentWeapon.TryAttack();
}
public void SwitchWeapon()
public void SwitchWeapon(Weapon requestedWeapon)
{
currentWeapon = requestedWeapon;
}
protected override void FinishedMovement()