void Update() { if (target == null) { Destroy(gameObject); return; } if (icon_group.activeSelf) { icon_group.SetActive(false); } if (!target.IsActive()) { return; } transform.position = target.transform.position; transform.rotation = Quaternion.LookRotation(TheCamera.Get().transform.forward, Vector3.up); ItemSlot selected = ItemSlotPanel.GetSelectedSlotInAllPanels(); if (selected != null && selected.GetItem() != null) { MAction action = selected.GetItem().FindMergeAction(target); foreach (PlayerCharacter player in PlayerCharacter.GetAll()) { if (player != null && action != null && action.CanDoAction(player, selected, target)) { icon.sprite = selected.GetItem().icon; title.text = action.title; icon_group.SetActive(true); } } } }