home *** CD-ROM | disk | FTP | other *** search
- class Hjerterad
- {
- var mc;
- var liv = 3;
- function Hjerterad(mc, skjerm_x, skjerm_y)
- {
- this.mc = mc;
- this.mc._x = skjerm_x;
- this.mc._y = skjerm_y;
- this.settLiv(3);
- }
- function mistLiv()
- {
- this.liv -= 1;
- if(this.liv < 1)
- {
- this.liv = 0;
- }
- this.mc.gotoAndStop(this.liv + 1);
- }
- function gameOver()
- {
- _root.nedelling.stoppNedtelling();
- _root.helt.iLufta = false;
- _root.helt.mc._alpha = 0;
- _root.frys = true;
- _root.fjernObjekt();
- _root.poengtelling.mc._visible = false;
- _root.nedtelling.mc._visible = false;
- _root.sauetelling.mc._visible = false;
- _root.vapenv.mc._visible = false;
- this.mc._visible = false;
- _root.gotoAndPlay("game_over");
- }
- function faaLiv()
- {
- this.liv += 1;
- this.mc.gotoAndStop(this.liv + 1);
- }
- function settLiv(liv)
- {
- this.liv = liv;
- this.mc.gotoAndStop(this.liv + 1);
- }
- }
-