private void getBulgeVertices(List <Vector3> listVertices, JigsawBulgeEnum jigsawBulge, Direction2DEnum direction, float withX, float highY) { List <Vector3> convex; List <Vector3> concave; List <Vector3> leftConcavePositionList = new List <Vector3>(); leftConcavePositionList.Add(new Vector3(-withX, -1.4f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, -1.2f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, -1f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, -0.8f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, -0.6f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, -0.4f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, -0.2f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, 0f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, 0.2f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, 0.4f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, 0.6f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, 0.8f)); leftConcavePositionList.Add(new Vector3(-withX - sawtoothHigh, 1f)); leftConcavePositionList.Add(new Vector3(-withX + sawtoothHigh, 1.2f)); leftConcavePositionList.Add(new Vector3(-withX, 1.4f)); GameUtil.getJigsawPuzzlescCCPositon(leftConcavePositionList, direction, withX, highY, out convex, out concave); if (jigsawBulge.Equals(JigsawBulgeEnum.Bulge)) { listVertices.AddRange(convex); } else if (jigsawBulge.Equals(JigsawBulgeEnum.Sunken)) { listVertices.AddRange(concave); } }
private void getBulgeVertices(List <Vector3> listVertices, JigsawBulgeEnum jigsawBulge, Direction2DEnum direction, float withX, float highY) { List <Vector3> convex; List <Vector3> concave; List <Vector3> leftConcavePositionList = new List <Vector3>(); //TODO 添加传统拼图形状 leftConcavePositionList.Add(new Vector3(-withX, -crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f, -crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f, -crossWith / 2f - 0.3f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f - crossWith, -crossWith / 2f - 0.3f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f - crossWith, -crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 1f, -crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 1f, crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f - crossWith, crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f - crossWith, crossWith / 2f + 0.3f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f, crossWith / 2f + 0.3f)); leftConcavePositionList.Add(new Vector3(-withX - 0.45f, crossWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX, crossWith / 2f)); GameUtil.getJigsawPuzzlescCCPositon(leftConcavePositionList, direction, withX, highY, out convex, out concave); if (jigsawBulge.Equals(JigsawBulgeEnum.Bulge)) { listVertices.AddRange(convex); } else if (jigsawBulge.Equals(JigsawBulgeEnum.Sunken)) { listVertices.AddRange(concave); } }
private void getHeartVertices(List <Vector3> listVertices, JigsawBulgeEnum jigsawBulge, Direction2DEnum direction, float withX, float highY) { List <Vector3> convex; List <Vector3> concave; List <Vector3> leftConcavePositionList = new List <Vector3>(); leftConcavePositionList.Add(new Vector3(-withX, -m_HeartFoot / 2f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh / 2f, -m_HeartWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 4.5f / 6f, -m_HeartWith * 5.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.5f / 6f, -m_HeartWith * 4.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.8f / 6f, -m_HeartWith * 3.2f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.8f / 6f, -m_HeartWith * 2.8f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.5f / 6f, -m_HeartWith * 1.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5f / 6f, -m_HeartWith * 0.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 3f / 4f, 0f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5f / 6f, m_HeartWith * 0.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.5f / 6f, m_HeartWith * 1.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.8f / 6f, m_HeartWith * 2.8f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.8f / 6f, m_HeartWith * 3.2f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 5.5f / 6f, m_HeartWith * 4.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh * 4.5f / 6f, m_HeartWith * 5.5f / 12f)); leftConcavePositionList.Add(new Vector3(-withX + -m_HeartHigh / 2f, m_HeartWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX, m_HeartFoot / 2f)); GameUtil.getJigsawPuzzlescCCPositon(leftConcavePositionList, direction, withX, highY, out convex, out concave); if (jigsawBulge.Equals(JigsawBulgeEnum.Bulge)) { listVertices.AddRange(convex); } else if (jigsawBulge.Equals(JigsawBulgeEnum.Sunken)) { listVertices.AddRange(concave); } }
private void getTriangleVertices(List <Vector3> listVertices, JigsawBulgeEnum jigsawBulge, Direction2DEnum direction, float withX, float highY) { List <Vector3> convex; List <Vector3> concave; List <Vector3> leftConcavePositionList = new List <Vector3>(); leftConcavePositionList.Add(new Vector3(-withX, -m_TriangleWith / 2f)); leftConcavePositionList.Add(new Vector3(-withX + -m_TriangleHigh, 0)); leftConcavePositionList.Add(new Vector3(-withX, m_TriangleWith / 2f)); GameUtil.getJigsawPuzzlescCCPositon(leftConcavePositionList, direction, withX, highY, out convex, out concave); if (jigsawBulge.Equals(JigsawBulgeEnum.Bulge)) { listVertices.AddRange(convex); } else if (jigsawBulge.Equals(JigsawBulgeEnum.Sunken)) { listVertices.AddRange(concave); } }
private void getPentagramVertices(List <Vector3> listVertices, JigsawBulgeEnum jigsawBulge, Direction2DEnum direction, float withX, float highY) { List <Vector3> convex; List <Vector3> concave; List <Vector3> leftConcavePositionList = new List <Vector3>(); leftConcavePositionList.Add(new Vector3(-withX, -m_PentagramFoot)); leftConcavePositionList.Add(new Vector3(-withX + 0.2f * m_PentagramZoom - m_PentagramWith / 2f, -0.15f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + 0.15f * m_PentagramZoom - m_PentagramWith / 2f, -0.47f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + -0.08f * m_PentagramZoom - m_PentagramWith / 2f, -0.24f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + -0.4f * m_PentagramZoom - m_PentagramWith / 2f, -0.29f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + -0.25f * m_PentagramZoom - m_PentagramWith / 2f, 0f)); leftConcavePositionList.Add(new Vector3(-withX + -0.4f * m_PentagramZoom - m_PentagramWith / 2f, 0.29f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + -0.08f * m_PentagramZoom - m_PentagramWith / 2f, 0.24f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + 0.15f * m_PentagramZoom - m_PentagramWith / 2f, 0.47f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX + 0.2f * m_PentagramZoom - m_PentagramWith / 2f, 0.15f * m_PentagramZoom)); leftConcavePositionList.Add(new Vector3(-withX, m_PentagramFoot)); GameUtil.getJigsawPuzzlescCCPositon(leftConcavePositionList, direction, withX, highY, out convex, out concave); if (jigsawBulge.Equals(JigsawBulgeEnum.Bulge)) { listVertices.AddRange(convex); } else if (jigsawBulge.Equals(JigsawBulgeEnum.Sunken)) { listVertices.AddRange(concave); } }