1 using System;
2 using
System.Collections;
3 using
UnityEngine;
4
5 namespace
UnityStandardAssets.Vehicles.Car
6 {
7     
public class SkidTrail : MonoBehaviour
8     {
9         [SerializeField]
private float m_PersistTime;
10
11
12         
private IEnumerator Start()
13         {
14             
while (true)
15             {
16                 
yield return null;
17
18                 
if (transform.parent.parent == null)
19                 {
20                     Destroy(gameObject, m_PersistTime);
21                 }
22             }
23         }
24     }
25 }


Tìm kết quả nhanh