public void Awake()
{
if(instance == null)
{
instance = this;
}
else
{
throw new System.Exception("Save already declared");
}
}
void FixedUpdate()
{
if(!isStopped)
{
transform.Translate(new Vector3((movementSpeed * -1)*Time.deltaTime, 0, 0));
}
}
void FixedUpdate()
{
if(!isStopped)
{
float moveHorizontal = Input.GetAxis("Horizontal");
// Debug.Log(moveHorizontal);
Vector2 movement = new Vector2(moveHorizontal, 0.0f);
Debug.Log(movement * movementSpeed);
_rb.AddForce(movement * movementSpeed);
}
}