Exemple #1
0
    /// <summary>
    /// Sets enabled visual treatment and disables actions
    /// </summary>
    public void Enable()
    {
        IsActive = true;
        if (_interactible != null)
        {
            _interactible.Enable();
        }
        BackStop.GetComponent <Collider>().enabled = true;
        if (_buttonCanvasGroup != null)
        {
            _buttonCanvasGroup.alpha = 1.0f;
        }
        GazeTimerImage.color = _gazeTimerColor;
        if (RingImage != null && _ringColor != Color.clear)
        {
            RingImage.color = _ringColor;
        }
        if (_circleColor != Color.clear)
        {
            CircleImage.color = _circleColor;
        }
        if (_iconColor != Color.clear)
        {
            IconImage.color = _iconColor;
        }
        if (_iconText != null && _iconColor != Color.clear)
        {
            _iconText.color = _iconColor;
        }
        SetGazeTime(_gazeTimeInSeconds);

        if (MakeSquareButton)
        {
            RingImage.gameObject.SetActive(false);
            CircleImage.gameObject.SetActive(false);
            _squareImage.color      = _circleColor;
            _squareImage.enabled    = true;
            _squareCollider.enabled = true;
            _circleCollider.enabled = false;
            //GazeTimerImage.transform.localScale = new Vector3(0.8f, 0.8f, 1.0f);
        }

        if (HideSquareImage)
        {
            _squareImage.enabled = false;
        }
    }
 public void Enable()
 {
     if (_interactible != null)
     {
         _interactible.Enable();
     }
     if (_canvasGroup != null)
     {
         _canvasGroup.alpha = 1.0f;
     }
 }