protected void InvokeInputEvent(EMovementInputType type, MovementInputEventArgs args)
        {
            switch (type)
            {
            case EMovementInputType.mouse:
            {
                didPerformMouseInput(this, args);
                break;
            }

            case EMovementInputType.body:
            {
                didPerformInput(this, args);
                break;
            }

            case EMovementInputType.drag:
            {
                didPerformMouseDragInput(this, args);
                break;
            }

            case EMovementInputType.release:
            {
                didRealeaseInput();
                break;
            }
            }
        }
Esempio n. 2
0
 void OnMouseDragInputWasPerformed(InputBroadcasterBaseBehaviour sender, MovementInputEventArgs args)
 {
     _queuedRotation = args.horisontalWorldInputValue * _sensevity;
 }
Esempio n. 3
0
        private void OnControlInputWasPerformed(InputBroadcasterBaseBehaviour sender, MovementInputEventArgs args)
        {
            if (Mathf.Approximately(args.horisontalWorldInputValue, 0f) && Mathf.Approximately(args.verticalWorldInputValue, 0f))
            {
                _quedVelocityGain = Vector3.zero;
            }

            if (_canPlayAccelerate)
            {
                PlayerAudioBehaviour.PlaySound(EAudioEventType.accelerate, transform.position);
                _canPlayAccelerate = false;
            }

            _quedVelocityGain.x += args.horisontalWorldInputValue;
            _quedVelocityGain.z += args.verticalWorldInputValue;
        }