Chataigne/Assets/Script/Move.cs
Djalim Simaila 6a86813c8d CODE
Creation d'une zone runner
Correction de bug tel que la vie
2023-06-01 02:02:10 +02:00

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);
}
}