public void setNewBlocksSpeed() { speedTimeInterval = slowSpeedTimeInterval + mediumSpeedTimeInterval + heightSpeedTimeInterval; if (_blocksSpeedIndex == 0) { gameLogicController.setBlocksSpeed(slowSpeed); _currentSpeedTimeInterval = slowSpeedTimeInterval; } if (_blocksSpeedIndex == 1) { gameLogicController.setBlocksSpeed(mediumSpeed); _currentSpeedTimeInterval = mediumSpeedTimeInterval; } if (_blocksSpeedIndex == 2) { gameLogicController.setBlocksSpeed(heightSpeed); _currentSpeedTimeInterval = heightSpeedTimeInterval; } }
void Update() { slowBonusCountLabel.text = _playerData.slowBonusCount.ToString(); float fillAmount = ((float)_bonusRechargeTime - _currentBonusTime) / (float)_bonusRechargeTime; circularRechargeIndicator.fillAmount = fillAmount; _currentBonusTime++; if (_currentBonusTime >= _bonusRechargeTime) { _currentBonusTime = _bonusRechargeTime; } if (_startBonus == true) { if (_currentBonusTime >= gameBalanceData.slowBonusMaxTime) { _startBonus = false; gameLogicController.setBlocksSpeed(gameLogicController.blocksSpeed + _startBonusGameSpeedSlowdown); } } }
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); }