예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     eqLabel       = GameObject.FindGameObjectWithTag("Name").GetComponent <InputField>();
     eqDescription = GameObject.FindGameObjectWithTag("Description").GetComponent <InputField>();
     eqDrop        = FindObjectOfType <Dropdown>();
     FillDrop.Fill(ref eqDrop, CharacterStatic.eqLable);
 }
예제 #2
0
 void Start()
 {
     abilityLabel       = GameObject.FindGameObjectWithTag("Name").GetComponent <InputField>();
     abilityDescription = GameObject.FindGameObjectWithTag("Description").GetComponent <InputField>();
     abilityLevel       = GameObject.FindGameObjectWithTag("input").GetComponent <Toggle>();
     abilityDrop        = FindObjectOfType <Dropdown>();
     FillDrop.Fill(ref abilityDrop, CharacterStatic.abilityLable);
 }
예제 #3
0
    public static void Delete(ref Dropdown drop)
    {
        int value = drop.value;

        File.Delete(ProfileStatic.ProfileFolderPath + "/" + drop.options[value].text + ".dat");

        drop.ClearOptions();
        FillDrop.Fill(ref drop, ProfileStatic.ProfileFolderPath);
    }
예제 #4
0
 void Start()
 {
     statsFields = GameObject.FindGameObjectsWithTag("input");
     label       = GameObject.FindGameObjectWithTag("Name").GetComponent <InputField>();
     statsDrop   = FindObjectOfType <Dropdown>();
     FillDrop.Fill(ref statsDrop, CharacterStatic.statsLable);
     slots      = GameObject.FindGameObjectWithTag("Slots").GetComponent <InputField>();
     slots.text = 5.ToString();
 }
예제 #5
0
 void Start()
 {
     if (ProfileStatic.ProfileFolderPath == null)
     {
         SceneManager.LoadScene(0);
     }
     else
     {
         FillDrop.Fill(ref sheetDrop, ProfileStatic.ProfileFolderPath);
     }
     ClearStatic.Clear();
 }
예제 #6
0
 /// <summary>
 /// Save values from inputs fields to dropdown component.
 /// </summary>
 /// <param name="drop">Dropdown object.</param>
 /// <param name="labels">List of labels where you wanna delete values.</param>
 /// <param name="inputs">Array of InputFields to save in dropdown.</param>
 public static void Delete(ref Dropdown drop, List <string> labels, InputField[] inputs)
 {
     drop.ClearOptions();
     if (labels.Count > 0)
     {
         FillDrop.Fill(ref drop, labels);
     }
     else
     {
         foreach (var item in inputs)
         {
             item.text = null;
         }
     }
     if (drop.options.Count == 0)
     {
         foreach (var item in GameObject.FindGameObjectsWithTag("HiddenButton"))
         {
             item.GetComponent <Button>().interactable = false;
         }
     }
 }