Esempio n. 1
0
    void CursorHoverClear(StoryLink[] links = null, GameObject[] objects = null)
    {
        IEnumerable <GameObject> all = null;

        if (links != null)
        {
            all = uiTextPlayer.Container
                  .GetComponentsInChildren <TwineTextPlayerElement>()
                  .Where(elem => links.Contains(elem.SourceOutput))
                  .Select(elem => elem.gameObject);
        }

        if (objects != null)
        {
            all = all != null?all.Concat(objects) : objects;
        }

        Animator cursorAnimator = cursor.GetComponentInChildren <Animator>();

        foreach (GameObject obj in all)
        {
            PointerHover hover = obj.GetComponent <PointerHover>();
            if (hover == null)
            {
                continue;
            }

            hover.OnPointerEnter = null;
            hover.OnPointerExit  = null;
        }
    }
Esempio n. 2
0
 /// <summary>
 /// Raises the <see cref="PointerHover"/> event.
 /// </summary>
 protected virtual void OnPointerHover(PointerEventArgs e)
 {
     PointerHover?.Invoke(this, e);
 }