Esempio n. 1
0
    void OnMouseOver()
    {
#else
    void OnHover()
    {
#endif

        librarian.HoveringOver(this);
        highlight.SetActive(true);
    }

#if MOBILE
    void OnMouseExit()
    {
#else
    void OnHoverExit()
    {
#endif

        librarian.HoveringOverEnded(this);
        highlight.SetActive(false);
    }

#if MOBILE
    void OnMouseUp()
    {
#else
    void OnHoverMouseUp()
    {
#endif

        if (!librarian.CanSelect())
        {
            return;
        }

        Shelf.BookSelected(this);
        IsSelected = true;
    }

    public void Deselect()
    {
        IsSelected = false;
        highlight.SetActive(false);
    }

    private IEnumerator HideTitleAfterSeconds(float seconds)
    {
        yield return(new WaitForSecondsRealtime(seconds));

        canvas.gameObject.SetActive(false);
    }
}