Update CollectCoins

This commit is contained in:
xixu-me committed 2025-03-27 09:04:59 +08:00
1 parent 31f39cfa92
commit cbf94c4b2e
55 files changed
+271 -20

No files matched your search

@@ -0,0 +1,22 @@
using UnityEngine;
using System.Collections;
public class BulletScript : MonoBehaviour {
public float bulletLifeTime = 10.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
StartCoroutine("bulletDestory");
}
IEnumerator bulletDestory()
{
yield return new WaitForSeconds(bulletLifeTime);
Destroy(this.gameObject);
}
}