Esempio n. 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        RopeGizmo ropeGizmo = (RopeGizmo)target;

        if (GUILayout.Button("REGENERATE ROPE"))
        {
            ropeGizmo.thisCatenary.Regenerate();
        }
    }
Esempio n. 2
0
    public void CreateRopeStart(Catenary catenary)
    {
        ropeStart      = Instantiate(catenary.RopeStart);
        ropeStart.name = catenary.gameObject.name + " Start ";
        catenary.p1    = ropeStart.transform;
        RopeGizmo temp = catenary.p1.GetComponent <RopeGizmo>();

        temp.thisCatenary          = catenary;
        temp.gizmoColor            = thisRopeGizmos;
        Selection.activeGameObject = ropeStart;
    }
Esempio n. 3
0
    public void CreateRopeEnd(Catenary catenary)
    {
        ropeEnd      = Instantiate(catenary.RopeEnd);
        ropeEnd.name = catenary.gameObject.name + " End ";
        catenary.p2  = ropeEnd.transform;
        RopeGizmo temp = catenary.p2.GetComponent <RopeGizmo>();

        temp.thisCatenary = catenary;
        temp.gizmoColor   = thisRopeGizmos;
        Vector3 tempPosition = ropeEnd.transform.position;

        tempPosition.x            += 10;
        ropeEnd.transform.position = tempPosition;
        Selection.activeGameObject = ropeEnd;
    }