using UnityEngine;
public class PlayerControll : MonoBehaviour
{
public float horizontalSpeed;
public float speedX;
public void MoveLeft()
{
speedX = -horizontalSpeed;
}
public void MoveRight()
{
speedX = horizontalSpeed;
}
public void MoveStop()
{
speedX = 0;
}
void FixedUpdate()
{
transform.Translate(speedX, 0, 0);
}
}