usingSystem.Collections.Generic;usingUnityEngine;classWp
{publicVector3 point;publicVector3 upDir;public floattime;publicWp()
{
}public Wp(Vector3 p, floatt)
{
point=p;
time=t;
}
}public classTuowei : MonoBehaviour
{private List sections = new List();//光效点列表
privateMesh mesh;public float time = 2.0f;public Color startColor =Color.white;public Color endColor = new Color(1, 1, 1, 0);privateMeshRenderer meshRenderer;privateMaterial trailMaterial;public float height = 2.0f;public bool isPlay = false;voidAwake()
{
MeshFilter meshF= GetComponent(typeof(MeshFilter)) asMeshFilter;
mesh=meshF.mesh;
meshRenderer= GetComponent(typeof(MeshRenderer)) asMeshRenderer;
trailMaterial=meshRenderer.material;
}voidStart()
{
}//每帧进行显示