コード例 #1
0
 void Start()
 {
     Data_static.Player_tab = new List <Player_stats> ();
     drunkG.SetActive(false);
     doctorG.SetActive(false);
     SurvivalistG.SetActive(false);
     SoldierG.SetActive(false);
     //  MurdererG.SetActive(false);
     MotherG.SetActive(false);
 }
コード例 #2
0
 public void Soldier_toggle(bool newValue)
 {
     Soldier = newValue;
     if (Soldier)
     {
         Data_static.Player_tab.Add(new Player_stats("soldier"));
         SoldierG.SetActive(true);
     }
     else
     {
         for (int i = 0; i < Data_static.Player_tab.Count; i++)
         {
             if (Data_static.Player_tab[i].name == "soldier")
             {
                 Data_static.Player_tab.RemoveAt(i);
             }
         }
         SoldierG.SetActive(false);
     }
     Debug.Log(Data_static.Player_tab[0].name);
 }