// curve の keyframe で描画 (drawer 直接) public void ForceUpdate() { drawer.Init(); amp.x = rectTrans.rect.width; amp.y = rectTrans.rect.height; float offsetX = -rectTrans.pivot.x; float offsetY = -rectTrans.pivot.y; Keyframe[] keys = curve.keys; Color c = color; drawer.Clear(); for (int i = 0; i < keys.Length - 1; i++) { Keyframe key0 = keys [i]; Keyframe key1 = keys [i + 1]; Vector3 pos0 = new Vector3(key0.time + offsetX, key0.value + offsetY, 0); pos0.Scale(amp); Vector3 pos1 = new Vector3(key1.time + offsetX, key1.value + offsetY, 0); pos1.Scale(amp); drawer.DrawLine(pos0, pos1, thickness, c); } drawer.Render(); }
public void Clear() { cmds.Clear(); points.Clear(); thicknessList.Clear(); colors.Clear(); if (verticesDrawer != null) { verticesDrawer.Clear(); } }