17
Assets/Player.cs
Normal file
17
Assets/Player.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Player : MonoBehaviour
|
||||
{
|
||||
public Rigidbody2D rb;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
rb.linearVelocity = new Vector2(Input.GetAxis("Horizontal"), rb.linearVelocityY);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user