Basic weapon slots system

This commit is contained in:
Alexey 2025-07-26 13:56:13 +03:00
commit 22a72e572e
7 changed files with 115 additions and 15 deletions

View file

@ -0,0 +1,14 @@
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