left click input is a place holder till I make a timer thing
Question
Ask your question here! Try to give as many detailss possible.
I’m trying to make a spawner for my enemy(left click input is a place holder until I can figure out
how to make a timer thing
extends Marker2D
const circle = preload("res://scenes/circle.tscn")
@onready var muzzle: Marker2D = $Marker2D
func _process(delta: float) -> void:
if Input.is_action_just_pressed("Left click"):
var circle_instance = circle.instantiate()
get_tree().root.add_child(circle_instance)
circle_instance.local_position = muzzle.local_position
circle_instance.rotation = rotation