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

  1. class Foss 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 Foss(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(!Figur.helt.slaar && !Figur.helt.stokkeslaar)
  25.       {
  26.          if(!Figur.helt.iFoss)
  27.          {
  28.             _root.fosslyd.start();
  29.          }
  30.          Figur.helt.iFoss = true;
  31.          Figur.helt.iLufta = true;
  32.          Figur.helt.brett_y += 10;
  33.       }
  34.    }
  35.    function visRiktigFrame()
  36.    {
  37.       if(!this.aktiv)
  38.       {
  39.          this.bliUsynlig();
  40.       }
  41.       else
  42.       {
  43.          this.nesteFrame = 1;
  44.       }
  45.    }
  46.    function oppdaterSkjermposisjon()
  47.    {
  48.       this.skjerm_x = this.brett_x + this.offset_x - Speleobjekt.brett.origo_x;
  49.       this.skjerm_y = this.brett_y + this.offset_y - Speleobjekt.brett.origo_y;
  50.    }
  51. }
  52.