コード例 #1
0
    /// <summary>
    /// creates and deletes frame sections
    /// </summary>
    void testFrameDeletion()
    {
        mySectionController.SetCurrentFrameSection("Sec_Steel_I");
        Debug.Log("Current frame section: " + mySectionController.GetCurrentFrameSection().GetName());
        myConstructorController.setPoint(p7, buildingObjects.Frame);
        myConstructorController.setPoint(p8, buildingObjects.Frame);

        mySectionController.SetCurrentFrameSection("Sec_Steel_I");
        Debug.Log("Current frame section: " + mySectionController.GetCurrentFrameSection().GetName());
        myConstructorController.setPoint(p9, buildingObjects.Frame);
        myConstructorController.setPoint(p10, buildingObjects.Frame);

        string deleteFrameName = "Frame_i=[" + p9.x + ":" + p9.z + ":" + p9.y + "]-j=[" + p10.x + ":" + p10.z + ":" + p10.y + "]";

        myConstructorController.deleteFrame(deleteFrameName);
    }
コード例 #2
0
 public void onClick()
 {
     if (isWait)
     {
         // user has confirmed they want to delete
         List <Frame> selection = new List <Frame>();
         selection = mySelectionController.GetSelectedFrames();
         foreach (Frame f in selection)
         {
             myConstructorController.deleteFrame(f.getName());
         }
         mySelectionController.deselect(selection);
         StopCoroutine(deleteCheck());
         buttonText.text = deleteText;
         isWait          = false;
     }
     else
     {
         // delete button has not been pressed yet
         buttonText.text = confirmText;
         StartCoroutine(deleteCheck());
     }
 }