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

  1. class illusoft.GameTile007 extends illusoft.GameTile
  2. {
  3.    var lastTime;
  4.    var levelComplete;
  5.    var dmc;
  6.    var character;
  7.    var Enemy;
  8.    function GameTile007(id, dEngine, character, game, gamemc, nextLevel)
  9.    {
  10.       super(id,dEngine,character,game,gamemc,nextLevel);
  11.       this.lastTime = new Date().getTime();
  12.    }
  13.    function Update(x, y)
  14.    {
  15.       super.Update(x);
  16.       if(!this.levelComplete)
  17.       {
  18.          if(x > 500 && x < 1500 && y < 1220)
  19.          {
  20.             _global.sounds.LoopSound("jetstream",60);
  21.          }
  22.          else
  23.          {
  24.             _global.sounds.FadeVolume("jetstream",false,false);
  25.          }
  26.          ┬º┬ºpush(this.dmc.stonem.sb.sou);
  27.          ┬º┬ºpush(1);
  28.          ┬º┬ºpush(this.character);
  29.          ┬º┬ºpush("dmc");
  30.       }
  31.       else
  32.       {
  33.          var _loc5_ = this.character.dmc;
  34.          var _loc4_ = new Date().getTime();
  35.          if(_loc5_.hitTest(this.dmc.button1))
  36.          {
  37.             this.character.MoveUp(22);
  38.             if(_loc4_ - this.lastTime > 500)
  39.             {
  40.                _global.sounds.PlaySound("boing");
  41.                this.lastTime = _loc4_;
  42.             }
  43.          }
  44.       }
  45.    }
  46.    function Init()
  47.    {
  48.       super.Init();
  49.       _global.sounds.StartMusic("loop3");
  50.       this.Enemy = "mole1/mole2/stonem.sb";
  51.       var _loc4_ = this;
  52.    }
  53.    function Start()
  54.    {
  55.       super.Start();
  56.    }
  57.    function Close()
  58.    {
  59.       _global.sounds.FadeVolume("jetstream",false,false);
  60.       _global.sounds.FadeVolume("stonemove",false,false);
  61.       super.Close();
  62.    }
  63.    function LevelComplete()
  64.    {
  65.       this.levelComplete = true;
  66.       _global.sounds.FadeVolume("jetstream",false,false);
  67.       _global.sounds.FadeVolume("stonemove",false,false);
  68.    }
  69. }
  70.