Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
 public Sprite GetIcon(HauntType type)
 {
     return(iconMap[type].image);
 }