Exemplo n.º 1
0
 public DotData(string ht, DLCType dt, OnType ot, string position)
 {
     this.position = position;
     type          = ht;
     dtype         = dt.ToString();
     otype         = ot.ToString();
 }
Exemplo n.º 2
0
    public static void SelectItem(DLCType dt)
    {
        string s;

        if (dt == DLCType.NONE)
        {
            s = "";
        }
        else
        {
            s = dt.ToString();
        }

        FieldInfo f   = ContentManager.data.GetType().GetField(selected.ToString().ToLower());
        string    ds  = (string)f.GetValue(ContentManager.data);
        DLCType?  odt = TypeUtils.getDType(ds);

        if (odt == null && ds == "")
        {
            odt = DLCType.NONE;
        }

        if (odt != null && dict.ContainsKey((DLCType)odt))
        {
            foreach (Transform t in dict[(DLCType)odt].transform)
            {
                if (t.name == "Takeoff")
                {
                    t.gameObject.SetActive(false);
                }
                else if (t.name == "Puton")
                {
                    t.gameObject.SetActive(true);
                }
            }
        }

        if (dict.ContainsKey(dt))
        {
            foreach (Transform t in dict[dt].transform)
            {
                if (t.name == "Takeoff" && dt != DLCType.NONE)
                {
                    t.gameObject.SetActive(true);
                }
                else if (t.name == "Puton")
                {
                    t.gameObject.SetActive(false);
                }
            }
        }

        f.SetValue(ContentManager.data, s);
        Saver.save(ContentManager.data);
        UpdateIcons();
    }
Exemplo n.º 3
0
 public string getName(DLCType dt)
 {
     return(getName(dt.ToString()));
 }