1234567891011121314151617 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Destroy : MonoBehaviour {
- //定义时间变量 过了一定时间摧毁生成物
- public float DestroyTime;
- // Use this for initialization
- void Start () {
- Destroy(this.gameObject,DestroyTime);
- }
-
- // Update is called once per frame
- void Update () {
-
- }
- }
|