public void CreateWave(int pCurrentLevel, int pCurrentColumn) { if (pCurrentLevel == 1) { levelDataPointer = level1; int tile = levelDataPointer[pCurrentColumn]; if (pCurrentColumn < levelDataPointer.GetLength(0)) { Enemy enemy = new Enemy(1000, 300); AddChild(enemy); } if (pCurrentColumn == levelDataPointer.GetLength(0) - 1) { MyGame myGame = game as MyGame; myGame.EndOfWave(); } } if (pCurrentLevel == 2) { levelDataPointer = level2; int tile = levelDataPointer[pCurrentColumn]; if (pCurrentColumn < levelDataPointer.GetLength(0)) { Enemy enemy = new Enemy(1000, 300); AddChild(enemy); } if (pCurrentColumn == levelDataPointer.GetLength(0) - 1) { MyGame myGame = game as MyGame; myGame.EndOfWave(); } } }