Chataigne/Assets/Script/Cloud.cs
Djalim Simaila 36a2982a48 IMPORTATION_CODE
Code parralax des décors
Ajout et correction du code Hadès
2023-05-30 20:24:37 +02:00

19 lines
351 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Cloud : MonoBehaviour
{
[SerializeField] private float speed = 1f;
Rigidbody2D rb;
void Start(){
rb = GetComponent<Rigidbody2D>();
}
void FixedUpdate(){
rb.velocity += new Vector2(speed,0);
}
}