home *** CD-ROM | disk | FTP | other *** search
- stop();
- fabryki._visible = true;
- chmurki._visible = true;
- _root.menu._visible = true;
- hero._visible = true;
- trawka._visible = true;
- sun._visible = true;
- hero.swapDepths(46);
- level = 1;
- menu.level_txt.text = level;
- live = 3;
- wytrzyma = 3;
- if(_root.scr < 1000)
- {
- _root.scr = 0;
- }
- else
- {
- _root.scr = _root.ilePunktow;
- }
- menu.score_txt.text = scr;
- muzyka1 = new Sound();
- muzyka1.attachSound("level1");
- muzyka1.setVolume(90);
- muzyka1.start(0,9999);
- trawka.trawka1.duplicateMovieClip("trawka1_dub",100);
- trawka.trawka1_dub._x = trawka.trawka1._x + trawka.trawka1._width;
- bgstartx = trawka._x;
- bgSpeed = 5;
- trawka.onEnterFrame = function()
- {
- trawka._x -= bgSpeed;
- if(trawka._x <= bgstartx - trawka.trawka1._width)
- {
- trawka._x = bgstartx - bgSpeed;
- }
- };
- fabryki.fabryki1.duplicateMovieClip("fabryki1_dub",100);
- fabryki.fabryki1_dub._x = fabryki.fabryki1._x + fabryki.fabryki1._width;
- bgstartx = fabryki._x;
- bgSpeed1 = 1;
- fabryki.onEnterFrame = function()
- {
- fabryki._x -= bgSpeed1;
- if(fabryki._x <= bgstartx - fabryki.fabryki1._width)
- {
- fabryki._x = bgstartx - bgSpeed1;
- }
- };
- chmurki.chmurki1.duplicateMovieClip("chmurki1_dub",100);
- chmurki.chmurki1_dub._x = chmurki.chmurki1._x + chmurki.chmurki1._width;
- bgstartx = chmurki._x;
- bgSpeed2 = 0.2;
- chmurki.onEnterFrame = function()
- {
- chmurki._x -= bgSpeed2;
- if(chmurki._x <= bgstartx - chmurki.chmurki1._width)
- {
- chmurki._x = bgstartx - bgSpeed2;
- }
- };
- sun.onEnterFrame = function()
- {
- this._x -= 0.05;
- };
- Vpion = 5;
- Vpoz = 6;
- fireRate = 10;
- repeatTime = 0;
- firing = false;
- costrzela = "laser1";
- klawiatura = new Object();
- klawiatura.onKeyDown = function()
- {
- if(_root._currentframe >= 151)
- {
- return undefined;
- }
- if(firing == false && Key.getCode() == 17)
- {
- firing = true;
- repeatTime = 0;
- }
- };
- klawiatura.onKeyUp = function()
- {
- if(Key.getCode() == 17)
- {
- firing = false;
- }
- };
- Key.addListener(klawiatura);
- hero.onEnterFrame = function()
- {
- trace(live);
- if(live <= 0)
- {
- _root.weaponLayer.removeMovieClip();
- _root.enemyLayer.removeMovieClip();
- _root.projectileLayer.removeMovieClip();
- _root.projectileLayerHero.removeMovieClip();
- delete this.onEnterFrame;
- delete trawka.onEnterFrame;
- delete sun.onEnterFrame;
- delete fabryki.onEnterFrame;
- delete chmurki.onEnterFrame;
- menu._visible = false;
- muzyka1.stop();
- delete this.onEnterFrame;
- delete wyspa.onEnterFrame;
- muzyka3.stop();
- delete this.onEnterFrame;
- delete wood1.onEnterFrame;
- delete sun3.onEnterFrame;
- delete mountain.onEnterFrame;
- delete chmurki3_1.onEnterFrame;
- muzyka2.stop();
- delete this.onEnterFrame;
- delete ny.onEnterFrame;
- muzyka5.stop();
- delete this.onEnterFrame;
- delete szkielet_zachod.onEnterFrame;
- muzyka4.stop();
- pustynia._visible = false;
- tlo_pustynia._visible = false;
- gotoAndStop(162);
- }
- l = 0;
- while(l < 46)
- {
- var nm = "enemy" + l;
- if(this._currentframe == 1)
- {
- if(this.hitTest(enemyLayer[nm]))
- {
- this.gotoAndPlay(2);
- enemyLayer[nm].gotoAndPlay(2);
- scr += 100;
- menu.score_txt.text = scr;
- menu.maska._xscale -= 30;
- if(menu.maska._xscale <= 0)
- {
- this.gotoAndPlay(3);
- menu.maska._xscale = 100;
- live--;
- costrzela = "laser1";
- menu.maska_live._xscale += 20;
- }
- }
- }
- l++;
- }
- if(Key.isDown(38))
- {
- hero._y -= Vpion;
- }
- else if(Key.isDown(40))
- {
- hero._y += Vpion;
- }
- if(Key.isDown(37))
- {
- hero._x -= Vpoz;
- }
- else if(Key.isDown(39))
- {
- hero._x += Vpoz;
- }
- if(hero._x < 60)
- {
- hero._x = 60;
- }
- if(hero._y < 76)
- {
- hero._y = 76;
- }
- if(hero._y > 320)
- {
- hero._y = 320;
- }
- if(hero._x > 525)
- {
- hero._x = 525;
- }
- if(energyLayer.hitTest(hero))
- {
- _root.lev3.gotoAndPlay("energyUP");
- energyLayer.onEnterFrame = function()
- {
- energyLayer._xscale -= 22;
- energyLayer._yscale -= 22;
- UPUP = new Sound();
- UPUP.attachSound("zoop");
- UPUP.start();
- if(energyLayer._xscale < 10)
- {
- menu.maska._xscale = 100;
- energyLayer.removeMovieClip();
- }
- };
- }
- if(weaponLayer.hitTest(hero))
- {
- weaponLayer.onEnterFrame = function()
- {
- weaponLayer._xscale -= 25;
- weaponLayer._yscale -= 25;
- UPUP = new Sound();
- UPUP.attachSound("zoop");
- UPUP.start();
- if(weaponLayer._xscale < 18)
- {
- weaponLayer.removeMovieClip();
- if(costrzela == "laser1")
- {
- _root.lev1.gotoAndPlay("weaponUP");
- costrzela = "laser1a";
- }
- else if(costrzela == "laser1a")
- {
- _root.lev1.gotoAndPlay("weaponUP");
- costrzela = "laser2";
- }
- else if(costrzela == "laser2")
- {
- _root.lev1.gotoAndPlay("weaponUP");
- costrzela = "bullet4";
- }
- else if(costrzela == "bullet4")
- {
- _root.lev1.gotoAndPlay("weaponUP");
- costrzela = "bullet5";
- }
- else if(costrzela == "bullet5")
- {
- _root.lev1.gotoAndPlay("weaponUP");
- costrzela = "super_bron";
- }
- }
- };
- }
- if(firing && repeatTime == 0)
- {
- bron = costrzela;
- createProjectileHero(bron,this._x,this._y,20,0);
- if(costrzela == "laser1" || costrzela == "laser1a")
- {
- type1 = new Sound();
- type1.attachSound("fx_1");
- type1.start();
- }
- else if(costrzela == "laser2")
- {
- type2 = new Sound(menu);
- type2.attachSound("fx_2");
- type2.setVolume(30);
- type2.start();
- }
- else if(costrzela == "bullet4" || costrzela == "bullet5")
- {
- type3 = new Sound();
- type3.attachSound("fx_3");
- type3.setVolume(100);
- type3.start();
- }
- else if(costrzela == "super_bron")
- {
- type4 = new Sound();
- type4.attachSound("fx_super_b");
- type4.setVolume(80);
- type4.start();
- }
- }
- repeatTime++;
- repeatTime %= fireRate;
- };
- _root.createEmptyMovieClip("enemyLayer",44);
- _root.createEmptyMovieClip("projectileLayer",42);
- _root.createEmptyMovieClip("projectileLayerHero",45);
- enemyCount = 0;
- ship_attack1 = function(type, ile)
- {
- wytrzyma_ship = 2;
- var zmianaX = 500;
- var zmianaY = 120;
- i = ile;
- while(i > 0)
- {
- zmianaX += 60;
- zmianaY += 60;
- enemyCount++;
- enemyCount %= 30;
- var nm = "enemy" + enemyCount;
- enemyLayer.attachMovie(type,nm,enemyCount);
- enemyLayer[nm]._y = zmianaY;
- enemyLayer[nm]._x = zmianaX;
- enemyLayer[nm].dx = 11;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x <= 250)
- {
- this._dx = 0;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 14;
- kierunekY = Math.random() * -6 + 2;
- createProjectile("bullet3",this._x,this._y,kierunekX,kierunekY);
- }
- this.f = true;
- }
- else
- {
- this._x -= this.dx;
- }
- if(this.f)
- {
- this._x += 20;
- }
- if(this._x > 700)
- {
- this.removeMovieClip();
- }
- };
- i--;
- }
- };
- ship_attack2 = function(type, y, ilosc, dol_czy_gora)
- {
- wytrzyma_ship = 5;
- var zmiana1 = 700;
- j = ilosc;
- while(j > 0)
- {
- zmiana1 += 60;
- enemyCount++;
- enemyCount %= 20;
- var nm = "enemy" + enemyCount;
- enemyLayer.attachMovie(type,nm,enemyCount);
- enemyLayer[nm]._x = zmiana1;
- enemyLayer[nm].yline = y;
- enemyLayer[nm]._y = y;
- enemyLayer[nm].dx = 8;
- enemyLayer[nm].t = Math.random() * 5;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x < 200)
- {
- this._y += dol_czy_gora;
- this._x -= 7;
- }
- else
- {
- this._y = this.yline + Math.sin(this.t) * 22;
- this._x -= this.dx;
- this.t += 0.5;
- }
- if(this._y > 400 || this._x < -10)
- {
- this.removeMovieClip();
- }
- };
- j--;
- }
- };
- ship_attack3 = function(type, y, ile, dol_czy_gora)
- {
- wytrzyma_ship = 1;
- var zmiana = 700;
- i = ile;
- while(i > 0)
- {
- zmiana += 60;
- enemyCount++;
- enemyCount %= 25;
- var nm = "enemy" + enemyCount;
- enemyLayer.attachMovie(type,nm,enemyCount);
- enemyLayer[nm]._y = y;
- enemyLayer[nm]._x = zmiana;
- enemyLayer[nm].dx = 11;
- enemyLayer[nm].onEnterFrame = function()
- {
- this._x -= this.dx;
- if(this._x < 290)
- {
- this._y += dol_czy_gora;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 5;
- kierunekY = Math.random() * -6 + 4;
- createProjectile("bullet1",this._x,this._y,kierunekX,kierunekY);
- }
- this.f = true;
- if(this._y >= 300)
- {
- this._x += 10;
- }
- }
- if(this._y > 400 || this._x < -10)
- {
- this.removeMovieClip();
- }
- };
- i--;
- }
- };
- boss_attack1 = function(type, x, y, jaka_bron)
- {
- wytrzyma = 18;
- bossCount = 12;
- bossCount++;
- if(bossCount == 17)
- {
- bossCount = 12;
- }
- spadaj = 0;
- var nm = "boss" + bossCount;
- enemyLayer.attachMovie(type,nm,bossCount);
- enemyLayer[nm]._y = y;
- enemyLayer[nm]._x = x;
- enemyLayer[nm].dy = 0;
- enemyLayer[nm].dx = -8;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x <= 350)
- {
- this.dx = 0;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 14;
- kierunekY = Math.random() * -6 + 2;
- createProjectile("bullet2",this._x,this._y + 20,kierunekX,kierunekY);
- this.f = true;
- spadaj++;
- }
- switch(this._y)
- {
- case 150:
- this.dy = 2;
- this.f = false;
- break;
- case 170:
- case 190:
- case 200:
- case 220:
- case 240:
- case 280:
- this.f = false;
- break;
- case 300:
- this.dy = - 2;
- this.f = false;
- }
- }
- if(wytrzyma <= 0)
- {
- addWeapon("weapon",jaka_bron,600,250,5);
- }
- if(spadaj >= 15)
- {
- this.dx = 5;
- }
- if(this._x > 600 || this._y < -100)
- {
- this.removeMovieClip();
- }
- this._y += this.dy;
- this._x += this.dx;
- };
- };
- boss_attack2 = function(type, x, y, jaka_bron)
- {
- wytrzyma = 11;
- bossCount = 0;
- bossCount++;
- if(bossCount == 11)
- {
- bossCount = 0;
- }
- spadaj = 0;
- var nm = "boss" + bossCount;
- enemyLayer.attachMovie(type,nm,bossCount);
- enemyLayer[nm]._y = y;
- enemyLayer[nm]._x = x;
- enemyLayer[nm].dy = 0;
- enemyLayer[nm].dx = -8;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x <= 350)
- {
- this.dx = 0;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 14;
- kierunekY = Math.random() * -6 + 2;
- createProjectile("bullet1",this._x,this._y + 40,kierunekX,kierunekY);
- createProjectile("bullet1",this._x,this._y - 28,kierunekX,kierunekY);
- this.f = true;
- spadaj++;
- }
- switch(this._y)
- {
- case 150:
- this.dy = 2;
- this.f = false;
- break;
- case 170:
- case 190:
- case 200:
- case 220:
- case 240:
- case 280:
- this.f = false;
- break;
- case 300:
- this.dy = - 2;
- this.f = false;
- }
- }
- if(wytrzyma <= 0)
- {
- addWeapon("weapon1",jaka_bron,600,200,3);
- }
- if(spadaj >= 15)
- {
- this.dx = 5;
- }
- if(this._x > 600 || this._y < -100)
- {
- this.removeMovieClip();
- }
- this._y += this.dy;
- this._x += this.dx;
- };
- };
- boss_attack_energy = function(type, x, y, jaka_bron)
- {
- wytrzyma = 11;
- bossCount = 17;
- bossCount++;
- if(bossCount == 20)
- {
- bossCount = 17;
- }
- spadaj = 0;
- var nm = "boss" + bossCount;
- enemyLayer.attachMovie(type,nm,bossCount);
- enemyLayer[nm]._y = y;
- enemyLayer[nm]._x = x;
- enemyLayer[nm].dy = 0;
- enemyLayer[nm].dx = -8;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x <= 350)
- {
- this.dx = 0;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 14;
- kierunekY = Math.random() * -6 + 2;
- createProjectile("bullet1",this._x,this._y + 40,kierunekX,kierunekY);
- createProjectile("bullet1",this._x,this._y - 28,kierunekX,kierunekY);
- this.f = true;
- spadaj++;
- }
- switch(this._y)
- {
- case 150:
- this.dy = 2;
- this.f = false;
- break;
- case 170:
- case 190:
- case 200:
- case 220:
- case 240:
- case 280:
- this.f = false;
- break;
- case 300:
- this.dy = - 2;
- this.f = false;
- }
- }
- if(wytrzyma <= 0)
- {
- addEnergy("energy",600,200,5);
- }
- if(spadaj >= 15)
- {
- this.dx = 5;
- }
- if(this._x > 600 || this._y < -100)
- {
- this.removeMovieClip();
- }
- this._y += this.dy;
- this._x += this.dx;
- };
- };
- projectileCount = 0;
- createProjectile = function(type, x, y, dx, dy)
- {
- var nm = "proj" + projectileCount;
- projectileLayer.attachMovie(type,nm,projectileCount);
- projectileLayer[nm]._x = x;
- projectileLayer[nm]._y = y;
- projectileLayer[nm].dx = dx;
- projectileLayer[nm].dy = dy;
- projectileLayer[nm].onEnterFrame = function()
- {
- this._x += this.dx;
- this._y += this.dy;
- if(this._x < 0)
- {
- this.removeMovieClip();
- }
- if(hero._currentframe == 1)
- {
- if(this.hitTest(hero))
- {
- hero.gotoAndPlay(2);
- this.removeMovieClip();
- menu.maska._xscale -= 10;
- if(menu.maska._xscale <= 0)
- {
- menu.maska._xscale = 100;
- hero.gotoAndPlay(3);
- live--;
- costrzela = "laser1";
- menu.maska_live._xscale += 20;
- }
- if(live < 0)
- {
- gotoAndPlay(162);
- }
- }
- }
- };
- projectileCount++;
- projectileCount %= 22;
- };
- createProjectileHero = function(type, x, y, dx, dy)
- {
- var nm = "proj" + projectileCount;
- projectileLayerHero.attachMovie(type,nm,projectileCount);
- projectileLayerHero[nm]._x = x;
- projectileLayerHero[nm]._y = y;
- projectileLayerHero[nm].dx = dx;
- projectileLayerHero[nm].dy = dy;
- projectileLayerHero[nm].onEnterFrame = function()
- {
- this._x += this.dx;
- this._y += this.dy;
- if(this._x > 540)
- {
- this.removeMovieClip();
- }
- var i = 0;
- while(i < 2)
- {
- var mm = "bossik" + i;
- if(this.hitTest(enemyLayer[mm]) && enemyLayer[mm]._currentframe == 1)
- {
- scr += 200;
- this.removeMovieClip();
- menu.score_txt.text = scr;
- przenies -= 1;
- if(przenies <= 0)
- {
- enemyLayer[mm].play();
- }
- }
- i++;
- }
- var i = 0;
- while(i < 21)
- {
- var enm = "boss" + i;
- if(this.hitTest(enemyLayer[enm]) && enemyLayer[enm]._currentframe == 1)
- {
- scr += 150;
- this.removeMovieClip();
- menu.score_txt.text = scr;
- wytrzyma -= 1;
- if(wytrzyma <= 0)
- {
- enemyLayer[enm].play();
- }
- }
- i++;
- }
- var i = 0;
- while(i < 46)
- {
- var enm = "enemy" + i;
- if(this.hitTest(enemyLayer[enm]) && enemyLayer[enm]._currentframe == 1)
- {
- wytrzyma_ship -= 1;
- this.removeMovieClip();
- if(wytrzyma_ship <= 0)
- {
- enemyLayer[enm].play();
- scr += 100;
- menu.score_txt.text = scr;
- }
- }
- i++;
- }
- };
- projectileCount++;
- projectileCount %= 22;
- };
- addW_count = 0;
- addWeapon = function(type, nazwa, x, y, dx)
- {
- _root.createEmptyMovieClip("weaponLayer",43);
- addW_count++;
- weaponLayer.attachMovie(type,nazwa,addW_count);
- weaponLayer._x = x;
- weaponLayer._y = y;
- weaponLayer.onEnterFrame = function()
- {
- weaponLayer._x -= dx;
- };
- };
- addEnergy = function(type, x, y, dx)
- {
- _root.createEmptyMovieClip("energyLayer",43);
- addW_count++;
- energyLayer.attachMovie(type,dodaj,addW_count);
- energyLayer._x = x;
- energyLayer._y = y;
- energyLayer.onEnterFrame = function()
- {
- energyLayer._x -= dx;
- };
- };
- attackTime = 0;
- next_lev = false;
- this.onEnterFrame = function()
- {
- if(attackTime == 50)
- {
- var sx = Math.random() * 180 + 100;
- ship_attack3("ship2",sx,6,7);
- }
- if(attackTime == 120)
- {
- ship_attack0("ship1",3);
- }
- if(attackTime == 250)
- {
- var sx = Math.random() * 100 + 180;
- ship_attack2("ship3",sx,8,7);
- }
- if(attackTime == 350)
- {
- var sx = Math.random() * 120 + 120;
- ship_attack3("ship2",sx,5,-7);
- }
- if(attackTime == 420)
- {
- ship_attack1("ship1",3);
- }
- if(attackTime == 480)
- {
- boss_attack1("boss1",600,150,laser2a);
- }
- if(attackTime == 650)
- {
- var sx = Math.random() * 120 + 120;
- ship_attack3("ship2",sx,5,9);
- }
- if(attackTime == 780)
- {
- var sx = Math.random() * 180 + 100;
- ship_attack3("ship2",sx,8,-8);
- }
- if(attackTime == 890)
- {
- boss_attack2("boss3",600,150,bullet1);
- }
- if(attackTime == 1050)
- {
- var sx = Math.random() * 100 + 180;
- ship_attack2("ship3",sx,4,3);
- }
- if(attackTime == 1100)
- {
- var sx = Math.random() * 120 + 120;
- ship_attack3("ship2",sx,6,5);
- }
- if(attackTime == 1200)
- {
- boss_attack1("boss1",600,150,bullet1);
- }
- if(attackTime == 1250)
- {
- boss_attack2("boss3",600,150,bullet_boss);
- }
- if(attackTime == 1400)
- {
- ship_attack1("ship1",2);
- }
- if(attackTime == 1450)
- {
- ship_attack1("ship1",2);
- }
- if(attackTime == 1550)
- {
- var sx = Math.random() * 180 + 100;
- ship_attack3("ship2",sx,5,8);
- }
- if(attackTime == 1600)
- {
- var sx = Math.random() * 180 + 100;
- ship_attack3("ship2",sx,5,-8);
- }
- if(attackTime == 1700)
- {
- ship_attack1("ship2",4);
- }
- if(attackTime == 1720)
- {
- boss_level("boss_koniec_1",600,150,bullet1);
- }
- if(attackTime > 1750 && przenies <= 0 && next_lev == true)
- {
- delete this.onEnterFrame;
- delete trawka.onEnterFrame;
- delete sun.onEnterFrame;
- delete fabryki.onEnterFrame;
- delete chmurki.onEnterFrame;
- fabryki._visible = false;
- chmurki._visible = false;
- trawka._visible = false;
- sun._visible = false;
- muzyka1.stop();
- gotoAndPlay(152);
- }
- attackTime++;
- trace(attackTime);
- trace(przenies);
- trace(next_lev);
- };
- boss_level = function(type, x, y, jaka_bron)
- {
- przenies = 25;
- bossikCount = 0;
- bossikCount++;
- bossik %= 2;
- var mm = "bossik" + bossikCount;
- enemyLayer.attachMovie(type,mm,bossikCount);
- enemyLayer[mm]._y = y;
- enemyLayer[mm]._x = x;
- enemyLayer[mm].dy = 0;
- enemyLayer[mm].dx = -8;
- enemyLayer[mm].onEnterFrame = function()
- {
- if(this._x <= 380)
- {
- this.dx = 0;
- if(this.f != true && this._currentframe == 1)
- {
- kierunekX = Math.random() * -5 - 14;
- kierunekY = Math.random() * -6 + 2;
- createProjectile("bullet2",this._x,this._y + 20,kierunekX,kierunekY);
- this.f = true;
- }
- switch(this._y)
- {
- case 150:
- this.dy = 2;
- this.f = false;
- break;
- case 170:
- case 190:
- case 200:
- case 220:
- case 240:
- case 280:
- this.f = false;
- break;
- case 300:
- this.dy = - 2;
- this.f = false;
- }
- }
- if(this._x > 600 || this._y < -100)
- {
- this.removeMovieClip();
- }
- this._y += this.dy;
- this._x += this.dx;
- };
- };
- ship_attack0 = function(type, ile)
- {
- wytrzyma_ship = 2;
- var zmianaX = 500;
- var zmianaY = 120;
- enemyCount2 = 35;
- i = ile;
- while(i > 0)
- {
- zmianaX += 60;
- zmianaY += 60;
- enemyCount2++;
- if(enemyCount2 == 45)
- {
- enemyCount = 35;
- }
- var nm = "enemy" + enemyCount2;
- enemyLayer.attachMovie(type,nm,enemyCount2);
- enemyLayer[nm]._y = zmianaY;
- enemyLayer[nm]._x = zmianaX;
- enemyLayer[nm].dx = 15;
- enemyLayer[nm].onEnterFrame = function()
- {
- if(this._x <= 250)
- {
- this.f = true;
- }
- else
- {
- this._x -= this.dx;
- }
- if(this.f)
- {
- gdziesX = Math.random() * 13 + 7;
- gdziesY = Math.random() * 12 + 5;
- this._y -= gdziesY;
- this._x -= gdziesX;
- }
- if(this._x < -20)
- {
- this.removeMovieClip();
- }
- };
- i--;
- }
- };
-