Update CollectCoins
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user