コード例 #1
0
ファイル: NewGameMenuMgr.cs プロジェクト: Prinquipe/Licenta
 // Start is called before the first frame update
 void Awake()
 {
     if (!GameMgr.GetLoadGame())
     {
         for (int i = 0; i < slot.Length; i++)
         {
             if (GameMgr.CheckIfEmpty(i + 1))
             {
                 slotText[i].text             = "Slot" + (i + 1) + " Empty";
                 deleteButton[i].interactable = false;
                 deleteButton[i].GetComponent <Image>().enabled = false;
             }
             else
             {
                 slotText[i].text = "Slot" + (i + 1) + ": " + GameMgr.GetSlotDateTime(i);
             }
         }
     }
     else
     {
         for (int i = 0; i < slot.Length; i++)
         {
             if (GameMgr.CheckIfEmpty(i + 1))
             {
                 slot[i].enabled  = false;
                 slotText[i].text = "Slot" + (i + 1) + " Empty";
             }
             else
             {
                 slotText[i].text = "Slot" + (i + 1) + ":" + GameMgr.GetSlotDateTime(i);
             }
         }
     }
 }
コード例 #2
0
ファイル: NewGameMenuMgr.cs プロジェクト: Prinquipe/Licenta
 public void OnSlot3Clicked()
 {
     if (!GameMgr.CheckIfEmpty(3))
     {
         StartGame(3);
     }
     else
     {
         StartNewGame(3);
     }
 }