Skip to content

Commit

Permalink
Load stats from overworld to encounters
Browse files Browse the repository at this point in the history
cool
  • Loading branch information
Pop4484 committed Nov 17, 2021
1 parent 53c206a commit f154af2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Assets/Scripts/Status/PlayerCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,25 @@ public void Reset(bool resetName = true) {
if (resetName)
Name = ControlPanel.instance.BasisName;
SetLevel(1);
SetEXP(0);
SetEXP(0); //ok so here you change the level!
SetGold(0);
Weapon = "Fists";
Armor = "Funny Clothes";
WeaponATK = 10;
ArmorDEF = 10;
HP = MaxHP;
MusicManager.SetSoundDictionary("RESETDICTIONARY", "");

if (File.Exists(Application.persistentDataPath + "/AlMightySave.gd")) //load level from overworld save file into battle too :D
{
Debug.Log("We found an almighty save at this location : " + Application.persistentDataPath + "/AlMightySave.gd");
BinaryFormatter bf = new BinaryFormatter();
FileStream file = File.Open(Application.persistentDataPath + "/AlMightySave.gd", FileMode.Open);
almightycurrentGame = (AlMightyGameState)bf.Deserialize(file);
almightycurrentGame.LoadVariables();
file.Close();
return true;
}
}

public int GetNext() {
Expand Down

0 comments on commit f154af2

Please sign in to comment.