예제 #1
0
        private void Update()
        {
            if (_isDead)
            {
                return;
            }

            if (Input.GetButton("Fire1"))
            {
                _attackController.ShootProjectile();
            }

            if (_isChangingGravity)
            {
                return;
            }

            var vertical   = Input.GetAxis("Vertical");
            var horizontal = Input.GetAxis("Horizontal");

            _motionController.Move(vertical, horizontal);

            if (DetectDoubleJump())
            {
                _gravity.Switch();
            }
            else if (IsJump())
            {
                _motionController.Jump();
            }
        }