public void Update() { if (actionLockController.IsLocked()) { return; } if (indc == null) { return; } nearestItem = GetNearestItem(); if (nearestItem == null) { indc.gameObject.SetActive(false); return; } indc.gameObject.SetActive(true); if (indcType != nearestItem.hauntType) { indcType = nearestItem.hauntType; indc.image.sprite = iconMap[indcType].image; } indc.transform.position = nearestItem.root.position + Vector3.up * indcHeight; }
public Sprite GetIcon(HauntType type) { return(iconMap[type].image); }