public override void InitTile( MidiTile data, float scale, float musictime, float delaytime, float startpresstime ) { base.InitTile(data, scale, musictime, delaytime, startpresstime); RenderModel = this.GetComponent <MorphCurve>(); m_SelfMaterial = this.GetComponent <MeshRenderer>().material; RenderModel.SetLength(m_Height); RenderModel.SetWidth(0.2f); RenderModel.SetDepth(scale); m_EnablePressed = false; m_PressedHeight = 0; m_PressedTime = 0.0f; if (m_PressParticle != null) { m_PressParticle.SetActive(false); } }
private void TestCreate() { List <Vector3> points = new List <Vector3>(); float every_t = 1.0f / (float)pointnum; for (int i = 0; i < pointnum; ++i) { Vector3 pos = CalculateCubicBezierPoint(every_t * i, this.transform.position, point1.position, point2.position, endpoint.position); points.Add(pos); } RenderModel.SetLength(0.1f); RenderModel.SetWidth(0.1f); RenderModel.SetDepth(10); RenderModel.CreateMesh(points.ToArray(), null); m_SelfMaterial = RenderModel.GetMeshMaterial(); }