Small refactor
This commit is contained in:
parent
82539c5af8
commit
c0489d405b
7 changed files with 11 additions and 15 deletions
|
|
@ -3,8 +3,7 @@ extends SubStateMachine
|
|||
class_name WeaponSubStateMachine
|
||||
|
||||
@export var animation_prefix: StringName
|
||||
@export var registry_entry: StringName
|
||||
@export var visibility_target: StringName
|
||||
@export var weapon_gid: StringName
|
||||
|
||||
@export var max_ammo: int
|
||||
@export var ammo: int = -1:
|
||||
|
|
@ -66,11 +65,11 @@ func _ready() -> void:
|
|||
|
||||
func _enter() -> void:
|
||||
super()
|
||||
player.weapon_models[visibility_target].show()
|
||||
player.weapon_models[weapon_gid].show()
|
||||
|
||||
func _exit() -> void:
|
||||
super()
|
||||
player.weapon_models[visibility_target].hide()
|
||||
player.weapon_models[weapon_gid].hide()
|
||||
|
||||
func use_begin() -> void:
|
||||
if current_state != null:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue