add anthill ui and bying units

This commit is contained in:
2024-10-06 15:56:04 +10:00
parent 0071d60fa1
commit 8096cd7046
17 changed files with 276 additions and 13 deletions

View File

@@ -0,0 +1,26 @@
extends Control
class_name FollowingUi
var target: Node3D
@onready var camera: Camera3D = get_viewport().get_camera_3d()
func _ready() -> void:
visible = false
func _process(_delta: float) -> void:
if not visible or target == null:
return
var pos := camera.unproject_position(target.global_position)
position = pos
func set_target(to: Node3D)->void:
visible = true
target = to
func close() -> void:
visible = true
target = null