Esempio n. 1
0
    private void DeselectCurrentObject(IInteractableObject obj)
    {
        CurrentObject.IsSelected = false;
        CurrentObject            = null;

        //m_charBeh.m_characterAnimation.SetLookingPoint(transform.forward, 0f);
        //m_charBeh.m_characterAnimation.SetRightHandIK(Vector3.zero, 0f);

        //HighlightsImageEffect.Instance.OnObjectMouseExit();
        GlowController.ResetAllObjects();
    }
Esempio n. 2
0
    private void CheckInteractionsInput()
    {
        // this should be checking all interactions attached to a single game object,
        // but lets imagine there is one one at a time

        if (CurrentObject == null)
        {
            return;
        }

        if (!IsInteracting && Input.GetMouseButtonDown(0))
        {
            IsInteracting = false;
            GlowController.ResetAllObjects();
            IsInteracting = CurrentObject.Activate() || IsInteracting;
        }

        if (IsInteracting && Input.GetMouseButtonDown(1))
        {
            IsInteracting = false;
            GlowController.ResetAllObjects();
            CurrentObject.Activate();
        }
    }