Files
turnbasedstrategygame/Scenes/Main/main.gd
2025-12-14 00:00:35 +01:00

25 lines
577 B
GDScript

extends Node
@onready var _Map: Node = $Map
@onready var _Unit = $Unit
@onready var _Camera = $CameraController
var _UnitScene = preload("res://Scenes/Unit/unit.tscn")
#@export var mapSize: int = 15
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
_createUnit(Vector2i(150, 150))
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _createUnit(pos: Vector2i):
var newUnit = _UnitScene.instantiate()
newUnit.global_position = pos
add_child(newUnit)