Beispiel #1
0
        public void Start()
        {
            guiManager     = GUIManager.instance;
            socialManager  = SocialManager.instance;
            missionManager = MissionManager.instance;
            staticData     = StaticData.instance;

            score               = 0;
            levelCoins          = 0;
            levelSecondaryCoins = 0;
            collisions          = 0;
            hasBeenRevived      = false;
            totalCoins          = PlayerPrefs.GetInt("Coins", 0);
            totalSecondaryCoins = PlayerPrefs.GetInt("SecondaryCoins", 0);

            currentPowerupLevel = new int[(int)PowerUpTypes.None];
            for (int i = 0; i < (int)PowerUpTypes.None; ++i)
            {
                currentPowerupLevel[i] = PlayerPrefs.GetInt(string.Format("PowerUp{0}", i), 0);
                if (currentPowerupLevel[i] == 0 && GameManager.instance.enableAllPowerUps)
                {
                    currentPowerupLevel[i] = 1;
                }
            }

            // first character is always available
            PurchaseCharacter(0);
        }
 void Awake()
 {
     instance = this;
 }
Beispiel #3
0
        public void Start()
        {
            guiManager = GUIManager.instance;
            socialManager = SocialManager.instance;
            missionManager = MissionManager.instance;
            staticData = StaticData.instance;

            score = 0;
            levelCoins = 0;
            levelSecondaryCoins = 0;
            collisions = 0;
            hasBeenRevived = false;
            totalCoins = PlayerPrefs.GetInt("Coins", 0);
            totalSecondaryCoins = PlayerPrefs.GetInt("SecondaryCoins", 0);

            currentPowerupLevel = new int[(int)PowerUpTypes.None];
            for (int i = 0; i < (int)PowerUpTypes.None; ++i) {
                currentPowerupLevel[i] = PlayerPrefs.GetInt(string.Format("PowerUp{0}", i), 0);
                if (currentPowerupLevel[i] == 0 && GameManager.instance.enableAllPowerUps) {
                    currentPowerupLevel[i] = 1;
                }
            }

            // first character is always available
            PurchaseCharacter(0);
        }
 void Awake()
 {
     instance = this;
 }