Пример #1
0
 public void SwitchVisualization(InteractableStateArgs obj)
 {
     if (obj.NewInteractableState == InteractableState.ActionState)
     {
         Hands.Instance.SwitchVisualization();
     }
 }
Пример #2
0
 public void GoMoo(InteractableStateArgs obj)
 {
     if (obj.NewInteractableState == InteractableState.ActionState)
     {
         _cowController.GoMooCowGo();
     }
 }
Пример #3
0
 public void IncreaseSpeedStateChanged(InteractableStateArgs obj)
 {
     if (obj.NewInteractableState == InteractableState.ActionState)
     {
         _locomotive.IncreaseSpeedStateChanged();
     }
 }
Пример #4
0
 public void ReverseButtonStateChanged(InteractableStateArgs obj)
 {
     if (obj.NewInteractableState == InteractableState.ActionState)
     {
         _locomotive.ReverseButtonStateChanged();
     }
 }
Пример #5
0
 public void StartStopStateChanged(InteractableStateArgs obj)
 {
     if (obj.NewInteractableState == InteractableState.ActionState)
     {
         _locomotive.StartStopStateChanged();
     }
 }
Пример #6
0
        private void InteractableStateChanged(InteractableStateArgs obj)
        {
            _buttonInContactOrActionStates = false;
            _glowRenderer.gameObject.SetActive(obj.NewInteractableState >
                                               InteractableState.Default);
            switch (obj.NewInteractableState)
            {
            case InteractableState.ContactState:
                StopResetLerping();
                _buttonMaterial.SetColor(_materialColorId, _buttonContactColor);
                _buttonInContactOrActionStates = true;
                break;

            case InteractableState.ProximityState:
                _buttonMaterial.SetColor(_materialColorId, _buttonDefaultColor);
                LerpToOldPosition();
                break;

            case InteractableState.ActionState:
                StopResetLerping();
                _buttonMaterial.SetColor(_materialColorId, _buttonActionColor);
                PlaySound(_actionSoundEffect);
                _buttonInContactOrActionStates = true;
                break;

            default:
                _buttonMaterial.SetColor(_materialColorId, _buttonDefaultColor);
                LerpToOldPosition();
                break;
            }
        }
Пример #7
0
        public void CrossingButtonStateChanged(InteractableStateArgs obj)
        {
            bool inActionState = obj.NewInteractableState == InteractableState.ActionState;

            if (inActionState)
            {
                ActivateTrainCrossing();
            }

            _toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ?
                                     obj.Tool : null;
        }
Пример #8
0
        private void StartStopStateChanged(InteractableStateArgs obj)
        {
            bool inActionState = obj.NewInteractableState == InteractableState.ActionState;

            if (inActionState)
            {
                if (_bladesRotation.IsMoving)
                {
                    _bladesRotation.SetMoveState(false, 0.0f);
                }
                else
                {
                    _bladesRotation.SetMoveState(true, _maxSpeed);
                }
            }

            _toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ?
                                     obj.Tool : null;
        }
 private void OnButtonStateChanged(InteractableStateArgs obj)
 {
     toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ?
                             obj.Tool : null;
 }