void Awake() { highlighter = GetComponent<Highlighter>(); if(IconPos != null) { Icon = HUDIcon.Create(HUDIconType.Exploration); Icon.CallbackClick = OnIconClick; Icon.gameObject.SetActive(false); } }
public void ChangeIcon(int skillNum) { if (!allIcons[skillNum].gameObject.activeInHierarchy) { return; } currentIcon.TurnOff(); currentNum = skillNum; currentIcon = allIcons[currentNum]; currentIcon.TurnOn(); }
public static void Recycle(HUDIcon icon) { if (icon != null) { icon.CallbackClick = null; PopupManager.Instance.RemoveItem(icon.gameObject); } else { BaseLogger.Log("Recyle a null NPCIcon!"); } }
void Awake() { Icon = HUDIcon.Create(HUDIconType.NPC); Icon.CallbackClick = OnIconClick; Icon.gameObject.SetActive(false); }
private void Start() { currentIcon = allIcons[0]; currentNum = 0; }