weapon display
This commit is contained in:
parent
553f8ea77a
commit
8fadd143c3
26 changed files with 491 additions and 46 deletions
13
gui/weapon_display/weapon_display.gd
Normal file
13
gui/weapon_display/weapon_display.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
extends Control
|
||||
|
||||
|
||||
func on_slots_changed(current_slot: StringName, slots_data: Dictionary[StringName,StringName]):
|
||||
for indicator in get_tree().get_nodes_in_group("weapon_indicator"):
|
||||
var slot_accessed_data = slots_data[indicator.lookup_slot]
|
||||
if slot_accessed_data == "":
|
||||
indicator.hide()
|
||||
continue
|
||||
indicator.show()
|
||||
var weapon = Registry.weapons[slot_accessed_data]
|
||||
indicator.set_weapon(weapon)
|
||||
indicator.set_current(current_slot == indicator.lookup_slot)
|
||||
Loading…
Add table
Add a link
Reference in a new issue