public void Awake()
 {
     instance = this;
 }
        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;
        }
 private void SpawnChaseObject()
 {
     GameObject prefab;
     if ((prefab = dataManager.GetChaseObjectPrefab()) != null) {
         chaseController = (GameObject.Instantiate(prefab) as GameObject).GetComponent<ChaseController>();
     }
 }
 public void Awake()
 {
     instance = this;
 }