Example #1
0
        private void Move()
        {
            var dir = new Vector3();

            if (Input.GetKey(KeyCode.W))
            {
                dir.z = 1;
            }
            if (Input.GetKey(KeyCode.A))
            {
                dir.x = -1;
            }
            if (Input.GetKey(KeyCode.S))
            {
                dir.z = -1;
            }
            if (Input.GetKey(KeyCode.D))
            {
                dir.x = 1;
            }

            _playerMover.SetVelocityVector(dir);
        }