#pragma strict private var m_pCubeObj : GameObject = null; private var m_pMeshFilter : MeshFilter = null; public var m_fTramslateSpeed : float = 20.0f; public var m_fRotateSpeed : float = 60.0f; function OnGUI(){ GUI.Label(new Rect(0.0f,0.0f,Screen.w…
#pragma strict public var m_pA : Vector3 = new Vector3(2.0f, 4.0f, 0.0f); public var m_pB : Vector3 = new Vector3(-4.0f, 2.0f,0.0f); private var m_pTemp : Vector3 = new Vector3(0.0f,0.0f,0.0f); private var m_fTemp : float = 0.0f; private var m_fAngle…
#pragma strict function Awake(){ var pMeshFilter : MeshFilter = gameObject.AddComponent(typeof(MeshFilter)) as MeshFilter;//网格过滤器 var pMeshRender : MeshRenderer = gameObject.AddComponent(typeof(MeshRenderer)) as MeshRenderer;//网格渲染 var pMesh : Mesh =…