bovido/addons/beehave/plugin.gd
Mathilde Grapin 1aed988149 Add a behavior tree to the enemy
Add the Beehave addon.
Make the enemy do the same thing as before but with a behavior tree.
2023-06-12 16:48:35 +02:00

25 lines
695 B
GDScript

@tool
extends EditorPlugin
const BeehaveEditorDebugger := preload("debug/debugger.gd")
var editor_debugger: BeehaveEditorDebugger
var frames: RefCounted
func _init():
name = "BeehavePlugin"
add_autoload_singleton("BeehaveGlobalMetrics", "res://addons/beehave/metrics/beehave_global_metrics.gd")
add_autoload_singleton("BeehaveGlobalDebugger", "res://addons/beehave/debug/global_debugger.gd")
print("Beehave initialized!")
func _enter_tree() -> void:
editor_debugger = BeehaveEditorDebugger.new()
frames = preload("debug/frames.gd").new()
add_debugger_plugin(editor_debugger)
func _exit_tree() -> void:
remove_debugger_plugin(editor_debugger)
editor_debugger.free()
frames.free()