brackeys-12/main.gd
2024-09-08 23:49:37 +03:00

9 lines
312 B
GDScript

extends Node2D
var test_building_scene: PackedScene = preload("res://Test_Building.tscn")
func _process(_delta):
if Input.is_action_just_pressed("lclick"):
var test_building: Sprite2D = test_building_scene.instantiate()
test_building.position = get_global_mouse_position()
$".".add_child(test_building)