Ejemplo n.º 1
0
        void Start()
        {
            playerScript = Player.GetComponent <PlayerMechControl>();

            stats = new int[] { GoldMedals, SilverMedals, BronzeMedals, AllKills, Earnings, Matches };

            for (int i = 0; i < statLabels.Length; i++)
            {
                if (!PlayerPrefs.HasKey(statLabels[i]))
                {
                    PlayerPrefs.SetInt(statLabels[i], 0);
                }
            }

            for (int i = 0; i < labels.Length; i++)
            {
                if (!PlayerPrefs.HasKey(labels[i]))
                {
                    PlayerPrefs.SetInt(labels[i], 0);
                }
            }

            autoCannonLevel    = PlayerPrefs.GetInt("autoCannonLevel");
            pulseLaserLevel    = PlayerPrefs.GetInt("pulseLaserLevel");
            electroHedronLevel = PlayerPrefs.GetInt("electroHedronLevel");
            stormGunLevel      = PlayerPrefs.GetInt("stormGunLevel");
            torsoLevel         = PlayerPrefs.GetInt("torsoLevel");
            armsLevel          = PlayerPrefs.GetInt("armsLevel");
            legsLevel          = PlayerPrefs.GetInt("legsLevel");
            speedLevel         = PlayerPrefs.GetInt("speedLevel");
            heatLevel          = PlayerPrefs.GetInt("heatLevel");

            GoldMedals     = PlayerPrefs.GetInt("GoldMedals");
            SilverMedals   = PlayerPrefs.GetInt("SilverMedals");
            BronzeMedals   = PlayerPrefs.GetInt("BronzeMedals");
            AllKills       = PlayerPrefs.GetInt("AllKills");
            Earnings       = PlayerPrefs.GetInt("Earnings");
            Matches        = PlayerPrefs.GetInt("Matches");
            UnlockedLeague = PlayerPrefs.GetInt("UnlockedLeague");
        }
Ejemplo n.º 2
0
 private void Awake()
 {
     Instance = this;
 }