using UnityEngine;
namespace UnityAtoms.Examples
{
///
/// Simple move script for the Player.
///
[AddComponentMenu("Unity Atoms/Examples/PlayerMove")]
public class PlayerMove : MonoBehaviour
{
private float _horizontal;
private float _vertical;
private void Update()
{
_horizontal = Input.GetAxis("Horizontal");
_vertical = Input.GetAxis("Vertical");
GetComponent().Move(new Vector2(_horizontal, _vertical), 5f, Time.deltaTime);
}
}
}