//New game, save and load stuff
    public void LoadPlayerInfo()
    {
        PlayerData_script playerData = SaveSystem_script.LoadPlayer();

        Name = playerData.Name;

        PartIndex  = new List <int>(playerData.PartIndex);
        ColorIndex = new List <int>(playerData.ColorIndex);

        CharacterCreator.GetAvatarInfo(PartIndex, ColorIndex, out AvatarParts, out PartColors);

        UiManager.SetPlayerGraphics(AvatarParts, PartColors);

        Credits = playerData.Credits;

        CombinePlayerDeck(playerData.CardString, playerData.CardAmount);

        Wins   = playerData.Wins;
        Loses  = playerData.Loses;
        Played = playerData.Played;

        MusicVolume = playerData.MusicVolume;
        SFXVolume   = playerData.SFXVolume;

        Options.LoadVolumeSettings(MusicVolume, SFXVolume);

        CalcWinRate();
    }
Example #2
0
    void Awake()
    {
        bool file = SaveSystem_script.FileExist();

        ContinueButton.interactable = file;
#if UNITY_WEBGL
        ContinueButton.gameObject.SetActive(false);
#endif
    }
Example #3
0
 public void DeleteGameSave()
 {
     SaveSystem_script.DeleteSaveFiles();
     ContinueButton.interactable = false;
 }
 public void SavePlayerInfo()
 {
     SaveSystem_script.SaveData(this);
 }