Untested PickupableItem
This commit is contained in:
parent
a2c062e8bb
commit
63e87e86d5
19 changed files with 200 additions and 17 deletions
|
@ -27,3 +27,13 @@ func select_slot(index: int):
|
|||
current_slot = slots[index]
|
||||
current_weapon = current_slot.weapon
|
||||
slot_selected.emit()
|
||||
|
||||
func first_free_slot() -> WeaponSlot:
|
||||
for slot in slots:
|
||||
if not slot.has_weapon:
|
||||
return slot
|
||||
return null
|
||||
|
||||
func refresh_current_slot() -> void:
|
||||
var index = slots.find(current_slot)
|
||||
select_slot(index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue