Added a static class that automatically spawns a Bugbot.

This commit is contained in:
Jamie Greunbaum 2024-05-15 01:21:37 -04:00
parent d880ef70c6
commit d245096bc5

View File

@ -1,3 +1,4 @@
class_name Bugbot
extends CharacterBody3D
@export_group("Inputs")
@ -59,6 +60,10 @@ var stored_pause_status : bool = false
var raycast_collision : Dictionary
static func instantiate(tree:SceneTree) -> void:
tree.root.add_child(load("res://addons/Bugbot/Scenes/bugbot_player.tscn").instantiate() as CharacterBody3D)
#region Initialisation
func _enter_tree() -> void:
stored_camera = get_viewport().get_camera_3d()