public void MoveSelectedPoints_ForEachPath()
        {
            MakeClosedPolygon(m_EditablePath1);
            MakeClosedPolygon(m_EditablePath2);

            m_EditablePath1.selection.Select(1, true);
            m_EditablePath1.selection.Select(2, true);

            m_EditablePath2.selection.Select(1, true);
            m_EditablePath2.selection.Select(2, true);

            m_Controller.MoveSelectedPoints(Vector3.up);

            Assert.AreEqual(new Vector3(100f, 200f, 0f) + Vector3.up, m_EditablePath1.GetPoint(1).position, "Incorrect point position");
            Assert.AreEqual(new Vector3(200f, 200f, 0f) + Vector3.up, m_EditablePath1.GetPoint(2).position, "Incorrect point position");
            Assert.AreEqual(new Vector3(100f, 200f, 0f) + Vector3.up, m_EditablePath2.GetPoint(1).position, "Incorrect point position");
            Assert.AreEqual(new Vector3(200f, 200f, 0f) + Vector3.up, m_EditablePath2.GetPoint(2).position, "Incorrect point position");
            Assert.AreEqual(2, m_EditablePath1.selection.Count, "Incorrect selection");
            Assert.AreEqual(2, m_EditablePath2.selection.Count, "Incorrect selection");
        }
        public void CreatePoint_InPolygon()
        {
            MakeClosedPolygon();

            m_Controller.CreatePoint(0, new Vector2(150f, 100f));
            Assert.AreEqual(5, m_EditablePath.pointCount, "Incorrect point count");
            Assert.AreEqual(new Vector3(150f, 100f, 0f), m_EditablePath.GetPoint(1).position, "Incorrect point position");
        }
Exemple #3
0
 private void SendPointClick(int pointIndex, int button)
 {
     SendClick(m_EditablePath.GetPoint(pointIndex).position, button);
 }