You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
433 B
GDScript

extends Control
@onready var animation = $AnimationPlayer as AnimationPlayer
@onready var camera: CameraManager = Global.camera_mgr
var target : Character
func _ready():
visible = false
animation.play("rotate")
func _process(delta):
if target:
position = camera.get_screen_pos(target.ui_pos_center())
func on_target_changed(target_id:int):
target = Global.character_mgr.get_character(target_id)
visible = target != null