public void setNewBlocksSpawnTime() { int spawnTime = 0; if (_blocksSpawnIndex == 0) { spawnTime = (int)((gameLogicController._blockHeight + bigGap) / gameLogicController.blocksSpeed); _spawnTimeInterval = blocksSpeedController.speedTimeInterval / 3; } if (_blocksSpawnIndex == 1) { spawnTime = (int)((gameLogicController._blockHeight + mediumGap) / gameLogicController.blocksSpeed); _spawnTimeInterval = blocksSpeedController.speedTimeInterval / 5; } if (_blocksSpawnIndex == 2) { spawnTime = (int)((gameLogicController._blockHeight + smallGap) / gameLogicController.blocksSpeed); _spawnTimeInterval = blocksSpeedController.speedTimeInterval / 7; } gameLogicController.setBlocksSpawnTime(spawnTime); }
public void setNewBalance() { List1Data currentStageData = _gameBalaceData.dataArray[_currentStageIndex]; gameLogicController.setBlocksSpeed(currentStageData.Speed); #if UNITY_IOS gameLogicController.setBlocksSpeed(currentStageData.Speed * 2); #endif int spawnTime = (int)((gameLogicController._blockHeight + currentStageData.Distancebetweeneblocks) / gameLogicController.blocksSpeed); gameLogicController.setBlocksSpawnTime(spawnTime); gameLogicController.blockTasksCount = currentStageData.Taskcount; gameLogicController.blockType = currentStageData.Blocktype; gameLogicController.randomTasksCount = true; if (currentStageData.Randomtaskcount == 0) { gameLogicController.randomTasksCount = false; } _currentStageTimeInterval = (int)(currentStageData.Timeinterval * 60); }