Well im “making” a game so i can practice and i want to save my game stats ive been looking alot on the internet but couldnt actually save this game data i dont know why. I know the code should be simple so if you can give me an idea or a code i would be very happy !!
using UnityEngine;
using System.Collections;
[Serializable]
public class Storage : MonoBehaviour {
//money
public static int money = 0 ;
public static int moneymultiplier = 1;
public static int moneymultipliercost = 50000;
//stats&hp
public static int health = 0;
public static int RatHelath = 50;
public static int DogHealth = 200;
public static int ChickenHealth = 600;
public static int HumanHealath = 1500;
public static int BossHealth = 100000;
public static int TapDMG = 1;
public static bool SpriteIsTriggered = false;
public static int Rats = 0;
public static int Dogs = 0;
public static int Chicken = 0;
public static int Human = 0;
public static int boss = 0;
//hunger
public static int RatsHunger = 5;
public static int DogsHunger = 10;
public static int ChickenHunger = 15;
public static int HumanHunger = 20;
public static int bossHunger = 50;
//fed
public static int RatFed = 0;
public static int DogFed = 0;
public static int ChickenFed = 0;
public static int HumanFed = 0;
public static int BossFed = 0;
//unlock sprites
public static bool Ratunlocked = false;
public static bool Dogunlocked = false;
public static bool Catunlocked = false;
public static bool Humanunlocked = false;
public static bool bossunlocked = false;
//cup
public static int CupDMG = 75;
public static int CupUpgrade = 1;
public static int CupUpgradePrice = 5000;
//level
public static int Level = 0;
public static int exp = 0;
public static int needed = 50;
}