Finished basic PickupableItem
This commit is contained in:
parent
63e87e86d5
commit
88c56f8aed
21 changed files with 163 additions and 35 deletions
|
@ -17,10 +17,11 @@ class WeaponSetData:
|
|||
old_weapon = _old_weapon
|
||||
|
||||
func _ready():
|
||||
has_weapon = get_child_count() > 0
|
||||
|
||||
var child_count = get_child_count()
|
||||
has_weapon = child_count > 0
|
||||
|
||||
if has_weapon:
|
||||
var child = get_child(0)
|
||||
var child = get_child(child_count - 1)
|
||||
assert(child is Weapon)
|
||||
weapon = child as Weapon
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue