//locks toggle for rest of day public void LockToggle() { player.isDailyTaskComplete[taskIndex] = true; toggle.interactable = false; SaveLoadPlayerData.SaveData(player); }
//Saves Player inputed data public void PlayerSetup() { bool isEmpty = false; playerName = nameInput.text; Debug.Log(playerName); for (int i = 0; i < goalInputList.Count; i++) { if (goalInputList[i].text.Length > 1) { goals[i] = goalInputList[i].text; } else { isEmpty = true; // Debug.Log("Woops"); } } if (playerName.Length > 1 && isEmpty == false) { dataHolderScript.player.playerGoals = goals; dataHolderScript.player.playerName = playerName; SaveLoadPlayerData.SaveData(dataHolderScript.player); gameManager.GetComponent <SceneHandler>().OpenScene("Home"); } else { //Show Warning Panel warningPanel.alpha = 1f; warningPanel.interactable = true; warningPanel.blocksRaycasts = true; } }
public void CheckDate() { if (currentDate.Date == lastLoginDate.Date) { isSameDay = true; } else { isSameDay = false; } SaveLoadPlayerData.SaveData(dataHolder.player); }
//Set New Name and Goals public void SavePlayerChanges() { playerName = nameInput.text; for (int i = 0; i < goalInputList.Count; i++) { if (goalInputList[i].text.Length > 1) { goals[i] = goalInputList[i].text; } else { containsNull = true; } } if (playerName.Length > 1 && !containsNull) { dataHolderScript.player.playerName = playerName; for (int i = 0; i < goalInputList.Count; i++) { dataHolderScript.player.playerGoals[i] = goals[i]; } SaveLoadPlayerData.SaveData(dataHolderScript.player); optionsPanel.interactable = true; playerSettingsPanel.interactable = false; playerSettingsPanel.GetComponent <UIScrollScript>().Scroll(); } else { //Show Warning Panel warningPanel.alpha = 1f; warningPanel.interactable = true; warningPanel.blocksRaycasts = true; } }
public void SaveData() { SaveLoadPlayerData.SaveData(player); }
public void SaveVolume() { dataHolderScript.player.volume = bgm.volume; SaveLoadPlayerData.SaveData(dataHolderScript.player); }