weapon system rework
This commit is contained in:
parent
0ffc2b2497
commit
30b01100f0
27 changed files with 352 additions and 190 deletions
27
scripts/state_machine/substate_machine.gd
Normal file
27
scripts/state_machine/substate_machine.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
extends StateMachine
|
||||
|
||||
class_name SubStateMachine
|
||||
|
||||
@export var enter_state: State
|
||||
|
||||
func enter() -> void:
|
||||
change_state(enter_state)
|
||||
|
||||
func exit() -> void:
|
||||
clear_state.rpc()
|
||||
|
||||
func update(delta: float) -> void:
|
||||
if current_state == null:
|
||||
return
|
||||
current_state.update(delta)
|
||||
|
||||
func physics_update(delta: float) -> void:
|
||||
if current_state == null:
|
||||
return
|
||||
current_state.physics_update(delta)
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue