Example #1
0
        public override void FixedUpdate()
        {
            Vector3 direction = new Vector3(Input.Horizontal, 0f, Input.Vertical);

            _mover.MoveTo(direction);
            _rotator.Rotate();
        }
        private void Rotate()
        {
            float horizontal = Input.GetAxisRaw("Horizontal");

            if (Mathf.Abs(horizontal) > 0f)
            {
                _rotator.Rotate(horizontal);
            }
        }
Example #3
0
 public override void FixedUpdate()
 {
     _rotator.Rotate();
 }