private void UpdateCommandText(string name) { CommandTextScript cts = CommandText.GetComponent <CommandTextScript>(); // print("Update Command Text."); cts.SetTextToSelectedWaypoint(name); }
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(); }
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(); }
private void DeleteHouseKeeping(GameObject waypoint) { // List Reordering Housekeeping DeleteWaypoint(waypoint); DeleteWaypointReordering(); InfoText it = InfoText.GetComponent <InfoText>(); it.WaypointDeleted(waypoint.gameObject.name); // Command Text should not display any point information. CommandTextScript cts = CommandText.GetComponent <CommandTextScript>(); cts.SetTextToWaypointDeleted(); currPointIndex -= 1; Destroy(waypoint); }