public void Save() { //Nsw Char Base Info player.maxHealth = 100; player.maxMana = 100; player.maxStamina = 100; player.curHealth = player.maxHealth; player.curMana = player.maxMana; player.curStamina = player.maxStamina; player.skinIndex = skinIndex; player.eyesIndex = eyesIndex; player.mouthIndex = mouthIndex; player.hairIndex = hairIndex; player.clothesIndex = clothesIndex; player.armourIndex = armourIndex; player.charClass = charClass; player.characterName = characterName; for (int i = 0; i < playerStats.Length; i++) { player.stats[i].value = (playerStats[i].statValue + playerStats[i].tempStat); } saveNew.Save(); SceneManager.LoadScene(2); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("CheckPoint")) { curCheckPoint = other.transform; healRate = 5; saveAndLoad.Save(); } }
private void OnTriggerEnter(Collider other) { // if you get to a checkpoint, the game will save and you will heal faster if (other.gameObject.CompareTag("CheckPoint")) { curCheckPoint = other.transform; healRate = 5; saveAndLoad.Save(); } }
public void OnTriggerExit(Collider other) { if (other.gameObject.tag == "CheckPoint") { for (int i = 0; i < attributes.Length; i++) { attributes[i].regenValue -= 7; } PlayerSaveAndLoad.Save(); } }
public void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("CheckPoint")) { currentCheckPoint = other.transform; for (int i = 0; i < attributes.Length; i++) { attributes[i].regenValue += 7; } PlayerSaveAndLoad.Save(); } }