using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UIElements;

public class PlayerController : MonoBehaviour
{
    [SerializeField] float horizontalAxis;
    [SerializeField] float carSpeed = 20.0f;

    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        horizontalAxis = Input.GetAxis("Horizontal");//press left arrow, right arrow

        transform.Translate(Vector3.right * horizontalAxis * Time.deltaTime * carSpeed);
    }
}
