30 lines
566 B
GDScript
30 lines
566 B
GDScript
@abstract
|
|
extends Node
|
|
|
|
class_name State
|
|
|
|
@warning_ignore_start("unused_signal","unused_parameter")
|
|
|
|
signal transition(to: StringName)
|
|
|
|
@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:
|
|
pass
|
|
func state_input(event: InputEvent) -> void:
|
|
pass
|