Files
defrain-shooter-unity/Assets/Scripts/Bullet.cs
2021-12-10 15:04:14 +01:00

18 lines
320 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bullet : MonoBehaviour
{
int seconds = 30;
private void Start()
{
StartCoroutine("dest");
}
IEnumerator dest()
{
yield return new WaitForSeconds(seconds);
Destroy(this);
}
}