DestroyDelay 协同法

2017-2-17 雨辰 Unity3D

using UnityEngine;
using System.Collections;

public class Ef_DestroyDelay : MonoBehaviour {
    public float delay = 1F;
	// Use this for initialization
	IEnumerator Start () {
        yield return new WaitForSeconds(delay);
        Destroy(gameObject);
	}

}

标签: Unity3D

发表评论:

雨辰 joyimp|@2011-2018 京ICP备16030765号