projetrunandgun/Assets/Scripts/Players/PlayerMain_Movement.cs
2023-10-30 21:16:40 -04:00

18 lines
343 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public partial class PlayerMain
{
[Header("Movement")]
[SerializeField] private float speed = 4f;
private void MovementHandler()
{
Vector2 move = _input.MoveDir;
move.y = 0f;
_rigidbody2D.velocity = move * speed;
}
}