コード例 #1
0
 // OVERWRITE CHECK
 public void CheckingSlots()
 {
     if (MainMenuSaving.LoadSlot1() == true)
     {
         textSlot[0].GetComponent <Text>().text = "Game Save Number 1";
     }
     else
     {
         textSlot[0].GetComponent <Text>().text                      = "Free save slot";
         loadSlotText[0].GetComponent <Text>().text                  = "No save file found";
         loadSlotTextShop[0].GetComponent <Text>().text              = "No save file found";
         loadSlotTextProfile[0].GetComponent <Text>().text           = "No save file found";
         loadSlotAchievementText[0].GetComponent <Text>().text       = "No save file found";
         loadSlot[0].GetComponent <Button>().interactable            = false;
         loadSlotShop[0].GetComponent <Button>().interactable        = false;
         loadSlotProfile[0].GetComponent <Button>().interactable     = false;
         loadSlotAchievement[0].GetComponent <Button>().interactable = false;
     }
     if (MainMenuSaving.LoadSlot2() == true)
     {
         textSlot[1].GetComponent <Text>().text = "Game Save Number 2";
     }
     else
     {
         textSlot[1].GetComponent <Text>().text                      = "Free save slot";
         loadSlotText[1].GetComponent <Text>().text                  = "No save file found";
         loadSlotTextShop[1].GetComponent <Text>().text              = "No save file found";
         loadSlotTextProfile[1].GetComponent <Text>().text           = "No save file found";
         loadSlotAchievementText[1].GetComponent <Text>().text       = "No save file found";
         loadSlot[1].GetComponent <Button>().interactable            = false;
         loadSlotShop[1].GetComponent <Button>().interactable        = false;
         loadSlotProfile[1].GetComponent <Button>().interactable     = false;
         loadSlotAchievement[1].GetComponent <Button>().interactable = false;
     }
     if (MainMenuSaving.LoadSlot3() == true)
     {
         textSlot[2].GetComponent <Text>().text = "Game Save Number 3";
     }
     else
     {
         textSlot[2].GetComponent <Text>().text                      = "Free save slot";
         loadSlotText[2].GetComponent <Text>().text                  = "No save file found";
         loadSlotTextShop[2].GetComponent <Text>().text              = "No save file found";
         loadSlotTextProfile[2].GetComponent <Text>().text           = "No save file found";
         loadSlotAchievementText[2].GetComponent <Text>().text       = "No save file found";
         loadSlot[2].GetComponent <Button>().interactable            = false;
         loadSlotShop[2].GetComponent <Button>().interactable        = false;
         loadSlotProfile[2].GetComponent <Button>().interactable     = false;
         loadSlotAchievement[2].GetComponent <Button>().interactable = false;
     }
 }
コード例 #2
0
    public void SaveSlot3()
    {
        if (MainMenuSaving.LoadSlot3() == false)
        {
            ResetData(); DefaultSprites(); SaveSystem.SaveSlot3(); SettingCanvasActive(); currentSaveFile.GetComponent <CurrentSaveFile>().GettingSaveFileNumber(3);
        }
        else
        {
            overWrite[2].SetActive(true);
        }

        if (overWriteCondition == true)
        {
            ResetData(); DefaultSprites(); SaveSystem.SaveSlot3(); SettingCanvasActive(); overWriteCondition = false; currentSaveFile.GetComponent <CurrentSaveFile>().GettingSaveFileNumber(3);
        }
    }