// Use this for initialization
    void Start()
    {
        currWaypoint = null;
        prevWaypoint = null;

        moving  = false;
        waiting = false;
        adding  = false;

        first_run = false;
        dbdh      = GameObject.Find("ZSlider").GetComponent <DetailBoxDragHelper>();
    }
예제 #2
0
    private void AddWaypointHouseKeeping(string waypoint)
    {
        // Disable Touches on AddWaypointButton.
        // Disable Touches on DeleteWaypointButton.
        // Switch CommandText.

        AddWaypointButtonScript abs = AddWaypointButton.GetComponent <AddWaypointButtonScript>();

        abs.DisableTap();
        AddWaypointButtonScript absText = AddText.GetComponent <AddWaypointButtonScript>();

        absText.DisableTap();

        DeleteWaypointButtonScript dwbs = DeleteWaypointButton.GetComponent <DeleteWaypointButtonScript>();

        dwbs.DisableTap();
        DeleteWaypointButtonScript dwbsText = DeleteText.GetComponent <DeleteWaypointButtonScript>();

        dwbsText.DisableTap();

        CommandTextScript cts = CommandText.GetComponent <CommandTextScript>();

        cts.SetTextToHeightCommand();

        // Graying out the AddwaypointButton b/c we're waiting for the height.

        ButtonColorHandler bch = AddWaypointButton.GetComponent <ButtonColorHandler>();

        bch.UpdateColorToGray();

        // Graying out the DeleteWaypointButton b/c we're waiting for the height.

        ButtonColorHandler bchd = DeleteWaypointButton.GetComponent <ButtonColorHandler>();

        bchd.UpdateColorToGray();

        // Switch ZSliders adding boolean to true.
        DetailBoxDragHelper dbdh = ZSlider.GetComponent <DetailBoxDragHelper>();

        dbdh.AddStateTrue();

        // Set CurrWaypoint of InfoText to the current waypoint because
        // an add action is considered a selection.

        InfoText it = InfoText.GetComponent <InfoText>();

        it.SetCurrWaypoint(waypoint);
        it.YesAdding();

        // Disable all waypoint tap function to prevent moves when waiting for height.
        DisableAllWaypointTapFunction();
    }
예제 #3
0
    private void AddWaypointUndoHouseKeeping(string waypoint)
    {
        // Enable Touches on AddWaypointButton.
        // Enable Touches on DeleteWaypointButton.
        // Switch CommandText.

        AddWaypointButtonScript abs = AddWaypointButton.GetComponent <AddWaypointButtonScript>();

        abs.EnableTap();
        AddWaypointButtonScript absText = AddText.GetComponent <AddWaypointButtonScript>();

        absText.EnableTap();

        DeleteWaypointButtonScript dwbs = DeleteWaypointButton.GetComponent <DeleteWaypointButtonScript>();

        dwbs.EnableTap();
        DeleteWaypointButtonScript dwbsText = DeleteText.GetComponent <DeleteWaypointButtonScript>();

        dwbsText.EnableTap();

        CommandTextScript cts = CommandText.GetComponent <CommandTextScript>();

        cts.SetTextToSelectedWaypoint(waypoint);

        // Default color for AddWaypointButton.

        ButtonColorHandler bch = AddWaypointButton.GetComponent <ButtonColorHandler>();

        bch.UpdateColorToDefault();

        // Default color for DeleteWaypointButton.
        ButtonColorHandler bchd = DeleteWaypointButton.GetComponent <ButtonColorHandler>();

        bchd.UpdateColorToDefault();

        // Switching ZSlider's adding boolean to true.
        DetailBoxDragHelper dbdh = ZSlider.GetComponent <DetailBoxDragHelper>();

        dbdh.AddStateFalse();

        InfoText it = InfoText.GetComponent <InfoText>();

        it.NoAdding();

        // Re-enable tap function for all waypoints.
        EnableAllWaypointTapFunction();
    }