Exemplo n.º 1
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();
    }