예제 #1
0
 public DotData(string ht, DLCType dt, OnType ot, string position)
 {
     this.position = position;
     type          = ht;
     dtype         = dt.ToString();
     otype         = ot.ToString();
 }
예제 #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();
    }
예제 #3
0
 public string getName(DLCType dt)
 {
     return(getName(dt.ToString()));
 }