Пример #1
0
 public void OnCrewValueChanged(int i)
 {
     if (i == 0)
     {
         if (crewButton.activeSelf)
         {
             crewButton.SetActive(false);
         }
     }
     else
     {
         selectedCrew = Crew.GetCrewByID(crewsIDs[i]);
         selectedCrew.DrawCrewIcon(crewButton.transform.GetChild(0).GetComponent <RawImage>());
         RedrawWindow();
     }
 }
    public void SelectCrew(Crew c)
    {
        showingCrew = c;
        hireButton.gameObject.SetActive(false);
        crewListDropdown.interactable = true;
        crewSlotsText.text            = Localization.GetPhrase(LocalizedPhrase.CrewSlots) + " : " + Crew.crewSlots.ToString();
        crewNameTextField.gameObject.SetActive(true);
        crewNameTextField.text = '\"' + showingCrew.name + '\"';

        mainCrewIcon.enabled = true;
        showingCrew.DrawCrewIcon(mainCrewIcon);

        savedProgressBarValue = (int)(showingCrew.stamina * 100);
        progressBar.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, startOffset, savedProgressBarValue / 100f * fullProgressBarLength);
        crewStatusText.text = savedProgressBarValue.ToString() + '%';
    }