private void NewWave() { if (floorBlocks.LevelLength <= 1) { gameOver = true; return; } puzzleLen = levelLoader.CurrWaveBlocks[0].GetLength(1); currentPuzzle = 0; cubesLeft = puzzleLen * floorBlocks.LevelWidth; levelTooShort = floorBlocks.LevelLength <= puzzleLen * levelLoader.NumPuzzles + 1; if (!levelTooShort) { puzzleCubes = new GameObject[floorBlocks.LevelWidth, puzzleLen]; waveCubes = new GameObject[floorBlocks.LevelWidth, puzzleLen *levelLoader.NumPuzzles]; } else { ppEffects.StartChromEffect(true); ppEffects.StartColorEffect(true); GetComponent <Flash>().Flashing = true; } setUpDone = false; setSpecialStarted = false; currentFallen = 0; endWave = false; CreateWaveBlocks(); CreateFloorWaveMaker(); raiseCubes.Cubes = waveCubes; }
public void DestroyRow() { ppEffects.StartChromEffect(false); ppEffects.StartColorEffect(false); for (int i_x = 0; i_x < levelWidth; i_x++) { for (int i_y = 0; i_y < levelDepth; i_y++) { floorCubes[i_x, i_y, floorCubes.GetLength(2) - levelLength].GetComponent <Cube>().Falling = true; } } if (levelLength > 1) { levelLength--; } if (Time.time > lastDestroyRowSound + destroyRowSoundDelay) { lastDestroyRowSound = Time.time; GetComponent <AudioSource>().PlayOneShot(destoryRowSound); } }