HUD and prototype textures
This commit is contained in:
parent
37a17878e4
commit
03bc73e9ff
45 changed files with 742 additions and 26 deletions
|
|
@ -7,18 +7,19 @@ class_name WeaponSubStateMachine
|
|||
@export var visibility_target: StringName
|
||||
|
||||
@export var max_ammo: int
|
||||
@onready var ammo: int = max_ammo:
|
||||
@export var ammo: int:
|
||||
set(value):
|
||||
if value < 0:
|
||||
ammo = 0
|
||||
else:
|
||||
ammo = value
|
||||
ammo_updated.emit()
|
||||
if ammo <= 0 and remaining_ammo <= 0:
|
||||
ammo_depleted.emit()
|
||||
get:
|
||||
return ammo
|
||||
@export var ammo_mags: int = 3
|
||||
@onready var remaining_ammo: int = max_ammo * ammo_mags:
|
||||
@export var remaining_ammo: int:
|
||||
set(value):
|
||||
if value < 0:
|
||||
remaining_ammo = 0
|
||||
|
|
@ -32,14 +33,17 @@ class_name WeaponSubStateMachine
|
|||
@export var slot: StringName
|
||||
|
||||
signal request_return
|
||||
signal ammo_updated
|
||||
signal ammo_depleted
|
||||
|
||||
var system: WeaponSystem
|
||||
var animation_player: AnimationPlayer
|
||||
var player_camera: PlayerCamera
|
||||
var player: Player
|
||||
var player: Player
|
||||
|
||||
func _ready() -> void:
|
||||
remaining_ammo = max_ammo * ammo_mags
|
||||
ammo = max_ammo
|
||||
for child in get_children():
|
||||
if child is WeaponState:
|
||||
states[child.name] = child
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue