mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Refactored weapon equipment system
This commit is contained in:
parent
2f76d4742e
commit
1a403d163a
10 changed files with 164 additions and 73 deletions
|
|
@ -211,12 +211,12 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
|
||||
public void AddWeapon(Weapon weapon)
|
||||
{
|
||||
_weaponProvider.AddWeapon(weapon);
|
||||
_weaponProvider.Equip(weapon, false);
|
||||
}
|
||||
|
||||
public void EquipWeapon(string itemKey)
|
||||
{
|
||||
_weaponProvider.EquipWeapon(itemKey);
|
||||
_weaponProvider.Equip(itemKey, true);
|
||||
}
|
||||
|
||||
public void UseItem(LootItem item, int currentAmount)
|
||||
|
|
@ -258,7 +258,7 @@ public partial class PlayerMovement : CharacterBody2D, IDestructible
|
|||
// Triggered by event in inventorymanager
|
||||
public void EquipWeapon(Weapon weapon)
|
||||
{
|
||||
_weaponProvider.EquipWeapon(weapon);
|
||||
_weaponProvider.Equip(weapon, true);
|
||||
}
|
||||
|
||||
private void FindInteractable()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue