예제 #1
0
    private void CreateType(ListUpgrade type, int maxQuality)
    {
        DeployMilitaryTag tag = GetTag();

        tag.Icon.Placeholder.text = type.ToString();
        tag.MaxQuality            = maxQuality;
        tag.Type = type;
        tag.gameObject.SetActive(true);
    }
예제 #2
0
    private DeployMilitaryTag GetTag()
    {
        for (int i = 0; i < tags.Count; i++)
        {
            if (!tags[i].gameObject.activeInHierarchy)
            {
                return(tags[i]);
            }
        }
        DeployMilitaryTag tag = Instantiate(TagPrefab, ScrollView.Content);

        tags.Add(tag);
        return(tag);
    }
예제 #3
0
 public void TagSelected(DeployMilitaryTag deployMilitaryTag, bool isInput)
 {
     if (refTag != deployMilitaryTag)
     {
         if (refTag != null)
         {
             refTag.Refresh();
             refTag = deployMilitaryTag;
         }
         else
         {
             refTag = deployMilitaryTag;
         }
         if (isInput)
         {
             refTag.InputField.Active(true);
             refTag.InputField.OpenKeyboard();
         }
     }
 }