14 lines
230 B
GDScript
14 lines
230 B
GDScript
extends Node3D
|
|
|
|
class_name WeaponSlot
|
|
|
|
var has_weapon = false
|
|
var weapon: Weapon
|
|
|
|
func _ready():
|
|
has_weapon = get_child_count() > 0
|
|
|
|
if has_weapon:
|
|
var child = get_child(0)
|
|
assert(child is Weapon)
|
|
weapon = child as Weapon
|