mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 17:17:47 -05:00
e5f6659eda
* Removed unused namespaces across all files in Unity.Atoms assembly. * Removed unused namspaces in runtime and Test assembly code.
19 lines
366 B
C#
19 lines
366 B
C#
using UnityEngine;
|
|
|
|
public class PlayerMove : MonoBehaviour
|
|
{
|
|
float horizontal = 0f;
|
|
float vertical = 0f;
|
|
|
|
void Update()
|
|
{
|
|
horizontal = Input.GetAxis("Horizontal");
|
|
vertical = Input.GetAxis("Vertical");
|
|
}
|
|
|
|
void FixedUpdate()
|
|
{
|
|
GetComponent<Rigidbody2D>().velocity = new Vector2(horizontal, vertical) * 5f;
|
|
}
|
|
}
|