endless runner

This commit is contained in:
2026-02-24 15:32:03 +01:00
parent 9d0a39d769
commit e804138c6e
6 changed files with 791 additions and 255 deletions

View File

@@ -0,0 +1,20 @@
using UnityEngine;
public class RoadController : MonoBehaviour
{
[SerializeField] private float moveSpeed = 10f;
private void Start()
{
Invoke("DestroyRoad", 30f);
}
private void Update()
{
transform.Translate(Vector3.right * (moveSpeed * Time.deltaTime));
}
private void DestroyRoad()
{
Destroy(gameObject);
}
}