the ability to switch weapons
This commit is contained in:
parent
0722053b84
commit
533f137c48
12 changed files with 928 additions and 15 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue