State machine rework
This commit is contained in:
parent
3f99f1b8dd
commit
87919ed890
25 changed files with 102 additions and 76 deletions
|
|
@ -7,8 +7,21 @@ class_name State
|
|||
|
||||
signal transition(to: StringName)
|
||||
|
||||
@abstract func enter() -> void
|
||||
@abstract func exit() -> void
|
||||
@abstract func _enter() -> void
|
||||
@abstract func _exit() -> void
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func enter():
|
||||
_enter()
|
||||
if is_multiplayer_authority():
|
||||
enter.rpc()
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func exit():
|
||||
_exit()
|
||||
if is_multiplayer_authority():
|
||||
exit.rpc()
|
||||
|
||||
func update(delta: float) -> void:
|
||||
pass
|
||||
func physics_update(delta: float) -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue