Added basic build menu and placement

This commit is contained in:
2024-03-06 09:25:28 -06:00
parent abde90e75f
commit ca8cfee1e8
25 changed files with 377 additions and 27 deletions

View File

@@ -0,0 +1,13 @@
extends Node2D
class_name BuildingBase
var _building_data: Building
@onready var sprite_2d: Sprite2D = $Sprite2D
func initialize(data: Building, grid_location: Vector2i) -> void:
_building_data = data
position = Grid.grid_to_world_center(grid_location)
func _ready() -> void:
sprite_2d.texture = _building_data.atlas_texture