Refactor weapon acquisition system to use named constant for no weapon equipped
This commit is contained in:
@@ -4,6 +4,7 @@ namespace GameCore.Player;
|
||||
|
||||
public class EquipmentComponent : IComponent
|
||||
{
|
||||
private const int NoWeaponIndex = -1;
|
||||
public List<string> EquippableWeaponItemIds { get; set; } = [];
|
||||
public int CurrentWeaponIndex { get; set; } = -1; // -1 indicates no weapon equipped
|
||||
public int CurrentWeaponIndex { get; set; } = NoWeaponIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user