red_dragon_pon/base/scripts/player/weapon_slot.gd
2025-07-26 13:56:13 +03:00

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