public override void Init()
        {
            base.Init();

            dataManager = DataManager.instance;

            powerUpType = GetComponent<PowerUpObject>().powerUpType;
        }
Пример #2
0
        public void Start()
        {
            gameManager = GameManager.instance;
            dataManager = DataManager.instance;
            gameManager.OnPauseGame += GamePaused;

            activePowerUp = PowerUpTypes.None;
            activePowerUpData = new CoroutineData();
        }
Пример #3
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();
        }
        public void Start()
        {
            dataManager = DataManager.instance;
            infiniteObjectManager = InfiniteObjectManager.instance;
            infiniteObjectManager.Init();
            infiniteObjectHistory = InfiniteObjectHistory.instance;
            infiniteObjectHistory.Init(infiniteObjectManager.GetTotalObjectCount());
            sectionSelection = SectionSelection.instance;
            chaseController = ChaseController.instance;

            moveDirection = Vector3.forward;
            spawnDirection = Vector3.forward;
            turnPlatform = new PlatformObject[(int)ObjectLocation.Last];
            turnIndex = new int[(int)ObjectLocation.Last];
            turnScene = new SceneObject[(int)ObjectLocation.Last];
            sceneTurnIndex = new int[(int)ObjectLocation.Last];

            infiniteObjectManager.GetObjectSizes(out platformSizes, out sceneSizes, out largestSceneLength);
            infiniteObjectManager.GetObjectStartPositions(out platformStartPosition, out sceneStartPosition);

            stopObjectSpawns = false;
            spawnData = new ObjectSpawnData();
            spawnData.largestScene = largestSceneLength;
            spawnData.useWidthBuffer = true;
            spawnData.section = 0;
            spawnData.sectionTransition = false;

            noCollidableProbability.Init();

            ShowStartupObjects(GameManager.instance.showTutorial);

            SpawnObjectRun(true);

            GameManager.instance.OnStartGame += StartGame;
        }
Пример #5
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;
            }
        }
Пример #6
0
        public void Start()
        {
            gameManager = GameManager.instance;
            dataManager = DataManager.instance;
            missionManager = MissionManager.instance;
            coinGUICollection = CoinGUICollection.instance;

            guiState = GUIState.MainMenu;
            inGamePowerUpData = new CoroutineData();
            gameManager.OnPauseGame += GamePaused;
            lastClickTime = -clickDelay;

            // hide everything except the main menu
            screenTouch.SetActive(false);
            mainMenuPanel.SetActive(true);
            logoPanel.SetActive(true);
            inGameLeftPanel.SetActive(false);
            inGameTopPanel.SetActive(false);
            inGameRightPanel.SetActive(false);
            if (revivePanel != null)
                revivePanel.SetActive(false);
            endGamePanel.SetActive(false);
            storePanel.SetActive(false);
            statsPanel.SetActive(false);
            missionsPanel.SetActive(false);
            if (inGameMissionsPanel != null)
                inGameMissionsPanel.SetActive(false);
            pausePanel.SetActive(false);
            tutorialPanel.SetActive(false);
        }
Пример #7
0
 public void Awake()
 {
     instance = this;
 }