public void SaveCharacter() { player.customisationTextureIndex = currentPartsTextureIndex; PlayerBinarySave.SavePlayerData(player); /*PlayerPrefs.SetInt("Skin Index", currentPartsTextureIndex[0]); * PlayerPrefs.SetInt("Hair Index", currentPartsTextureIndex[1]); * PlayerPrefs.SetInt("Mouth Index", currentPartsTextureIndex[2]); * PlayerPrefs.SetInt("Eyes Index", currentPartsTextureIndex[3]); * PlayerPrefs.SetInt("Clothes Index", currentPartsTextureIndex[4]); * PlayerPrefs.SetInt("Armour Index", currentPartsTextureIndex[5]); * * //to do on our own * //PlayerPrefs.SetString("Character Name", characterName); * * //final stat = defaultStat + additionalStat + levelUpStat * * for (int i = 0; i < player.playerStats.baseStats.Length; i++) * { * PlayerPrefs.SetInt(player.playerStats.baseStats[i].baseStatName + " defaultStat", player.playerStats.baseStats[i].defaultStat); * PlayerPrefs.SetInt(player.playerStats.baseStats[i].baseStatName + " additionalStat", player.playerStats.baseStats[i].additionalStat); * PlayerPrefs.SetInt(player.playerStats.baseStats[i].baseStatName + " levelUpStat", player.playerStats.baseStats[i].levelUpStat); * } * * PlayerPrefs.SetString("Character Profession", player.Profession.ProfessionName);*/ }
public void Save() { PlayerBinarySave.SavePlayerData(this); }