19 lines
349 B
C#
19 lines
349 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Move : MonoBehaviour
|
|
{
|
|
[SerializeField] private float speed = 1f;
|
|
Rigidbody2D rb;
|
|
|
|
void Start(){
|
|
rb = GetComponent<Rigidbody2D>();
|
|
}
|
|
|
|
void FixedUpdate(){
|
|
rb.velocity = new Vector2(speed,0);
|
|
}
|
|
}
|