extends Area3D

@export var coordinates: Vector4i
@export var is_black: bool = false
@export var resource: TileResource

var map_reference: HexGrid

@onready var hexagon_small = $HexagonSmall

func _ready() -> void:
	if is_black:
		hexagon_small.set_surface_override_material(0, resource.material_black.duplicate())
	else:
		hexagon_small.set_surface_override_material(0, resource.material_white.duplicate())

	var mat: StandardMaterial3D = hexagon_small.get_surface_override_material(0)
	mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
	mat.albedo_color.a = 0.5
