Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        //Update overlay rect
        SetOverlaySize();
        Vector3 centerPoint = Camera.main.WorldToScreenPoint(transform.position);

        OverlayRect.xMin = centerPoint.x - (m_OverlayWidth / 2.0f);
        OverlayRect.xMax = centerPoint.x + (m_OverlayWidth / 2.0f);
        OverlayRect.yMax = Screen.height - (centerPoint.y - (m_OverlayLength / 2.0f) - 5);
        OverlayRect.yMin = Screen.height - (centerPoint.y + (m_OverlayLength / 2.0f) + 15);

        if (m_JustBeenSelected)
        {
            m_JustBeenSelectedTimer += Time.deltaTime;

            if (m_JustBeenSelectedTimer >= 1.0f)
            {
                m_JustBeenSelectedTimer = 0;
                m_JustBeenSelected      = false;
                m_GLManager.RemoveItemToRender(m_GLItem);
            }
        }
    }
Exemplo n.º 2
0
 public void SetDeselected()
 {
     m_GLManager.RemoveItemToRender(m_GLItem);
 }