Guest User

state

a guest
Oct 20th, 2023
2,403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. extends Node2D
  2. class_name State
  3.  
  4. @onready var debug = owner.find_child("debug")
  5. @onready var player = owner.get_parent().find_child("player")
  6. @onready var animation_player = owner.find_child("AnimationPlayer")
  7.  
  8. func _ready():
  9. set_physics_process(false)
  10.  
  11. func enter():
  12. set_physics_process(true)
  13.  
  14. func exit():
  15. set_physics_process(false)
  16.  
  17. func transition():
  18. pass
  19.  
  20. func _physics_process(_delta):
  21. transition()
  22. debug.text = name
  23.  
Add Comment
Please, Sign In to add comment