public void Init(int objectCount) { activeObjectLocation = ObjectLocation.Center; objectSpawnIndex = new List <int> [(int)ObjectLocation.Last]; objectTypeSpawnIndex = new int[(int)ObjectLocation.Last][]; lastLocalIndex = new int[(int)ObjectLocation.Last][]; latestObjectTypeSpawnDistance = new float[(int)ObjectLocation.Last][]; lastObjectSpawnDistance = new List <float> [(int)ObjectLocation.Last]; objectLocationAngle = new float[(int)ObjectLocation.Last]; totalDistance = new float[(int)ObjectLocation.Last]; totalSceneDistance = new float[(int)ObjectLocation.Last]; platformDistanceDataMap = new PlatformDistanceDataMap[(int)ObjectLocation.Last]; topPlatformObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; bottomPlatformObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; topSceneObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; bottomSceneObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; previousPlatformSection = new int[(int)ObjectLocation.Last]; previousSceneSection = new int[(int)ObjectLocation.Last]; spawnedPlatformSectionTransition = new bool[(int)ObjectLocation.Last]; spawnedSceneSectionTransition = new bool[(int)ObjectLocation.Last]; for (int i = 0; i < (int)ObjectLocation.Last; ++i) { objectSpawnIndex[i] = new List <int>(); objectTypeSpawnIndex[i] = new int[(int)ObjectType.Last]; lastLocalIndex[i] = new int[(int)ObjectType.Last]; latestObjectTypeSpawnDistance[i] = new float[(int)ObjectType.Last]; lastObjectSpawnDistance[i] = new List <float>(); platformDistanceDataMap[i] = new PlatformDistanceDataMap(); for (int j = 0; j < objectCount; ++j) { objectSpawnIndex[i].Add(-1); lastObjectSpawnDistance[i].Add(0); } for (int j = 0; j < (int)ObjectType.Last; ++j) { objectTypeSpawnIndex[i][j] = -1; lastLocalIndex[i][j] = -1; latestObjectTypeSpawnDistance[i][j] = -1; } } infiniteObjectManager = InfiniteObjectManager.instance; }
public void CopyFrom(PlatformDistanceDataMap other) { distances = other.distances.GetRange(0, other.distances.Count); localIndexes = other.localIndexes.GetRange(0, other.localIndexes.Count); sections = other.sections.GetRange(0, other.sections.Count); }
public void Init(int objectCount) { activeObjectLocation = ObjectLocation.Center; objectSpawnIndex = new List<int>[(int)ObjectLocation.Last]; objectTypeSpawnIndex = new int[(int)ObjectLocation.Last][]; lastLocalIndex = new int[(int)ObjectLocation.Last][]; latestObjectTypeSpawnDistance = new float[(int)ObjectLocation.Last][]; lastObjectSpawnDistance = new List<float>[(int)ObjectLocation.Last]; objectLocationAngle = new float[(int)ObjectLocation.Last]; totalDistance = new float[(int)ObjectLocation.Last]; totalSceneDistance = new float[(int)ObjectLocation.Last]; platformDistanceDataMap = new PlatformDistanceDataMap[(int)ObjectLocation.Last]; topPlatformObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; bottomPlatformObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; topSceneObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; bottomSceneObjectSpawned = new InfiniteObject[(int)ObjectLocation.Last]; previousPlatformSection = new int[(int)ObjectLocation.Last]; previousSceneSection = new int[(int)ObjectLocation.Last]; spawnedPlatformSectionTransition = new bool[(int)ObjectLocation.Last]; spawnedSceneSectionTransition = new bool[(int)ObjectLocation.Last]; for (int i = 0; i < (int)ObjectLocation.Last; ++i) { objectSpawnIndex[i] = new List<int>(); objectTypeSpawnIndex[i] = new int[(int)ObjectType.Last]; lastLocalIndex[i] = new int[(int)ObjectType.Last]; latestObjectTypeSpawnDistance[i] = new float[(int)ObjectType.Last]; lastObjectSpawnDistance[i] = new List<float>(); platformDistanceDataMap[i] = new PlatformDistanceDataMap(); for (int j = 0; j < objectCount; ++j) { objectSpawnIndex[i].Add(-1); lastObjectSpawnDistance[i].Add(0); } for (int j = 0; j < (int)ObjectType.Last; ++j) { objectTypeSpawnIndex[i][j] = -1; lastLocalIndex[i][j] = -1; latestObjectTypeSpawnDistance[i][j] = -1; } } infiniteObjectManager = InfiniteObjectManager.instance; }
public void CopyFrom(PlatformDistanceDataMap other) { distances = other.distances.GetRange(0, other.distances.Count); localIndexes = other.localIndexes.GetRange(0, other.localIndexes.Count); sections = other.sections.GetRange(0, other.sections.Count); }