using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player_movement : MonoBehaviour
{
[Min(1.5f)]
public float movement_speed = 1.5f;
private Rigidbody2D player;
// Start is called before the first frame update
void Start()
{
player = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
float totalpos = Input.GetAxis("Vertical");
player.MovePosition(player.position.y + totalpos);
}
}