home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / david.swf / scripts / __Packages / Paere.as < prev    next >
Encoding:
Text File  |  2007-03-28  |  1.1 KB  |  49 lines

  1. class Paere extends Figur
  2. {
  3.    var mc;
  4.    var dybde;
  5.    var iLufta;
  6.    var blankFrame;
  7.    var nesteFrame;
  8.    var skjerm_x;
  9.    var brett_x;
  10.    var skjerm_y;
  11.    var brett_y;
  12.    function Paere(mc, brett_x, brett_y, bredde, hogde)
  13.    {
  14.       super(mc,brett_x,brett_y,bredde,hogde);
  15.       Figur.figurliste.push(this);
  16.       this.mc.swapDepths(4100 + Figur.figurliste.length);
  17.       this.dybde = this.mc.getDepth();
  18.       this.iLufta = true;
  19.       this.aks_y = 0.7;
  20.       this.blankFrame = 5;
  21.    }
  22.    function vedTreff()
  23.    {
  24.       if(!_root.helt.knock && !_root.helt.flat)
  25.       {
  26.          this.bliUsynlig();
  27.          this.aktiv = false;
  28.          _root.spiser.start();
  29.          _root.poengtelling.leggTilPoeng(12);
  30.       }
  31.    }
  32.    function visRiktigFrame()
  33.    {
  34.       if(!this.aktiv)
  35.       {
  36.          this.bliUsynlig();
  37.       }
  38.       else
  39.       {
  40.          this.nesteFrame = 1;
  41.       }
  42.    }
  43.    function oppdaterSkjermposisjon()
  44.    {
  45.       this.skjerm_x = this.brett_x + this.offset_x - Speleobjekt.brett.origo_x;
  46.       this.skjerm_y = this.brett_y + this.offset_y - Speleobjekt.brett.origo_y;
  47.    }
  48. }
  49.