File size: 417 Bytes
8f07272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extends Node
class_name State

var _parent : State = null

@onready var _state_machine : StateMachine = _get_state_machine(self)

func unhandled_input(event):
	return
	
func process(delta):
	return
	
func physics_process(delta):
	return

func enter(msg: ={}):
	return
	
func exit():
	pass
	
func _get_state_machine(node:Node):
	if not node is StateMachine:
		return _get_state_machine(node.get_parent())
	return node