This commit is contained in:
2025-01-17 13:10:42 +01:00
commit 4536213c91
15115 changed files with 1442174 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using System.Collections;
using UnityEngine;
using static UnityEngine.UIElements.UxmlAttributeDescription;
public class MeteorRain : MonoBehaviour
{
[SerializeField] private GameObject Meteorite;
IEnumerator Start()
{
while (true)
{
yield return new WaitForSeconds(3f);
Create();
}
}
void Create()
{
GameObject meteor = Instantiate(Meteorite, transform.position, transform.rotation);
meteor.GetComponent<Rigidbody>().linearVelocity =
new Vector3(Random.Range(-10.0f, 10.0f), Random.Range(-10.0f, 0f), 0);
}
}