10 lines
312 B
GDScript3
10 lines
312 B
GDScript3
|
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)
|