コード例 #1
0
    public void AddSelectedObject(ProjectObject projectObject)
    {
        if (ProjectObjects.instance.CheckIfObjectIsSelectable(projectObject))
        {
            if (!selectingKit)
            {
                DeselectSelection();
            }
            selectedObjects.Add(projectObject);
            projectObject.interactiveSelect.HighlightObject();
            lastSelectedObject = projectObject;
            InstatiateSelectedObjectUI();

            bool selectionPlannable = true;
            for (int i = 0; i < selectedObjects.Count; i++)
            {
                selectionPlannable = ProjectObjects.instance.CheckIfObjectIsPlannable(selectedObjects[i]);
                if (!selectionPlannable)
                {
                    break;
                }
            }
            planMenuButton.SetDisabled(!selectionPlannable);
            infoMenuButton.SetDisabled(false);
            selectPrereqsButton.SetDisabled(false);
        }
    }
コード例 #2
0
ファイル: DurationMenu.cs プロジェクト: Grit-Virtual/au_demo
 public void SelectHour(int hour)
 {
     if (!hourRadioButtons [hour - 1].active)
     {
         durationHours = hour;
     }
     else
     {
         durationHours = 0;
     }
     durationTextInput.ReceiveInputFromForm((durationHours + durationMins).ToString());
     nextButton.SetDisabled(durationHours + durationMins <= 0);
 }
コード例 #3
0
 public void SelectCrewSize(int size)
 {
     crewSize = size;
     crewSizeTextInput.ReceiveInputFromForm(size.ToString());
     nextButton.SetDisabled(crewSize <= 0);
 }