home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / starisland.swf / scripts / __Packages / illusoft / GameTile006.as < prev    next >
Encoding:
Text File  |  2007-12-10  |  1.4 KB  |  53 lines

  1. class illusoft.GameTile006 extends illusoft.GameTile
  2. {
  3.    var levelComplete;
  4.    var character;
  5.    var dmc;
  6.    var Enemy;
  7.    var startJump = false;
  8.    function GameTile006(id, dEngine, character, game, gamemc, nextLevel)
  9.    {
  10.       super(id,dEngine,character,game,gamemc,nextLevel);
  11.    }
  12.    function Update(x, y)
  13.    {
  14.       if(!this.levelComplete)
  15.       {
  16.          if(x > 1670 && y > 1000)
  17.          {
  18.             _global.sounds.LoopSound("jetstream",60);
  19.          }
  20.          else
  21.          {
  22.             _global.sounds.FadeVolume("jetstream",false,false);
  23.          }
  24.       }
  25.       super.Update(x);
  26.       if(this.dmc.btn_red.hitTest(this.character.dmc))
  27.       {
  28.          this.startJump = true;
  29.          this.dmc.jump_mc.play();
  30.       }
  31.       if(this.startJump)
  32.       {
  33.          illusoft.Game.Instance.character.wheelPrimitive.setPos(this.dmc.jump_mc._x + this.dmc.jump_mc.star_mc._x,this.dmc.jump_mc._y + this.dmc.jump_mc.star_mc._y);
  34.       }
  35.    }
  36.    function Init()
  37.    {
  38.       super.Init();
  39.       this.Enemy = "s1/s2/s3/n1.nutbody/n2.nutbody/n3.nutbody";
  40.       _global.sounds.StartMusic("loop2");
  41.    }
  42.    function Close()
  43.    {
  44.       _global.sounds.FadeVolume("jetstream",false,false);
  45.       super.Close();
  46.    }
  47.    function LevelComplete()
  48.    {
  49.       this.levelComplete = true;
  50.       _global.sounds.FadeVolume("jetstream",false,false);
  51.    }
  52. }
  53.