|
RpgGame
Console Based RPG game in C#
|
Represents a hand occupation strategy for two-handed equipment. More...
Public Member Functions | |
| override bool | EquipLeft (Player player, IEquippable item) |
| Attempts to equip the item in the left hand. For two-handed items, this delegates to a shared method that occupies both hands. | |
| override bool | EquipRight (Player player, IEquippable item) |
| Attempts to equip the item in the right hand. For two-handed items, this delegates to a shared method that occupies both hands. | |
Public Member Functions inherited from RpgGame.Items.HandOccupation | |
| bool | EquipLeft (Player player, IEquippable item) |
| Attempts to equip the specified item into the player's left hand. | |
| bool | EquipRight (Player player, IEquippable item) |
| Attempts to equip the specified item into the player's right hand. | |
Represents a hand occupation strategy for two-handed equipment.
The TwoHandOccupation class defines the behavior required to equip an item that occupies both the left and right hands.
This strategy ensures that both hands must be free before equipping the item. If either hand is already occupied, the equip operation fails.
This class is part of the equipment strategy system and helps eliminate the need for type checks or enumeration-based logic when determining how items are equipped.
|
inline |
Attempts to equip the item in the left hand. For two-handed items, this delegates to a shared method that occupies both hands.
| player | The player attempting to equip the item. |
| item | The item being equipped. |
|
inline |
Attempts to equip the item in the right hand. For two-handed items, this delegates to a shared method that occupies both hands.
| player | The player attempting to equip the item. |
| item | The item being equipped. |