// 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; } }
public void SaveSlot2() { if (MainMenuSaving.LoadSlot2() == false) { ResetData(); DefaultSprites(); SaveSystem.SaveSlot2(); SettingCanvasActive(); currentSaveFile.GetComponent <CurrentSaveFile>().GettingSaveFileNumber(2); } else { overWrite[1].SetActive(true); } if (overWriteCondition == true) { ResetData(); DefaultSprites(); SaveSystem.SaveSlot2(); SettingCanvasActive(); overWriteCondition = false; currentSaveFile.GetComponent <CurrentSaveFile>().GettingSaveFileNumber(2); } }