Bomb
This commit is contained in:
parent
388fe1ccce
commit
6b939d241c
12 changed files with 128 additions and 68 deletions
|
|
@ -3,10 +3,15 @@ extends SubStateMachine
|
|||
class_name WeaponSubStateMachine
|
||||
|
||||
@export var animation_prefix: StringName
|
||||
@export var visibility_mesh: Node3D
|
||||
|
||||
@export var max_ammo: int
|
||||
@onready var ammo: int = max_ammo
|
||||
|
||||
@export var can_be_previous: bool = true
|
||||
|
||||
signal request_return
|
||||
|
||||
var system: WeaponSystem
|
||||
var animation_player: AnimationPlayer
|
||||
var player_camera: PlayerCamera
|
||||
|
|
@ -17,6 +22,15 @@ func _ready() -> void:
|
|||
states[child.name] = child
|
||||
child.machine = self
|
||||
child.transition.connect(on_transition_required)
|
||||
child.return_to_previous.connect(request_return.emit)
|
||||
|
||||
func enter() -> void:
|
||||
super()
|
||||
visibility_mesh.visible = true
|
||||
|
||||
func exit() -> void:
|
||||
super()
|
||||
visibility_mesh.visible = false
|
||||
|
||||
@rpc("authority","call_local","reliable")
|
||||
func use_begin() -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue