Example #1
0
        public void Start()
        {
            infiniteObjectGenerator = InfiniteObjectGenerator.instance;
            guiManager = GUIManager.instance;
            dataManager = DataManager.instance;
            audioManager = AudioManager.instance;
            powerUpManager = PowerUpManager.instance;
            missionManager = MissionManager.instance;
            inputController = InputController.instance;
            cameraController = CameraController.instance;
            coinGUICollection = CoinGUICollection.instance;

            Application.runInBackground = runInBackground;
            activeCharacter = -1;
            SpawnCharacter();
            SpawnChaseObject();
        }
Example #2
0
 public void Awake()
 {
     instance = this;
 }
Example #3
0
        public void Start()
        {
            dataManager = DataManager.instance;

            activeMissions = new MissionType[3]; // 3 active missions at a time
            scoreMultiplier = 1;
            for (int i = 0; i < activeMissions.Length; ++i) {
                activeMissions[i] = (MissionType)PlayerPrefs.GetInt(string.Format("Mission{0}", i), -1);
                // there are no active missions if the game hasn't been started yet
                if ((int)activeMissions[i] == -1) {
                    activeMissions[i] = (MissionType)(i * 4); // 4 missions per set
                }
                scoreMultiplier += ((int)activeMissions[i] % 4) * scoreMultiplierIncrement;
            }

            if (instantGUINotification) {
                guiManager = GUIManager.instance;
                instantNotificationDelay = new WaitForSeconds(instantGUINotificationUpdateInterval);
                GameManager.instance.OnStartGame += StartGame;
            }
        }
Example #4
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);
        }