home *** CD-ROM | disk | FTP | other *** search
- class illusoft.GameTile007 extends illusoft.GameTile
- {
- var lastTime;
- var levelComplete;
- var dmc;
- var character;
- var Enemy;
- function GameTile007(id, dEngine, character, game, gamemc, nextLevel)
- {
- super(id,dEngine,character,game,gamemc,nextLevel);
- this.lastTime = new Date().getTime();
- }
- function Update(x, y)
- {
- super.Update(x);
- if(!this.levelComplete)
- {
- if(x > 500 && x < 1500 && y < 1220)
- {
- _global.sounds.LoopSound("jetstream",60);
- }
- else
- {
- _global.sounds.FadeVolume("jetstream",false,false);
- }
- §§push(this.dmc.stonem.sb.sou);
- §§push(1);
- §§push(this.character);
- §§push("dmc");
- }
- else
- {
- var _loc5_ = this.character.dmc;
- var _loc4_ = new Date().getTime();
- if(_loc5_.hitTest(this.dmc.button1))
- {
- this.character.MoveUp(22);
- if(_loc4_ - this.lastTime > 500)
- {
- _global.sounds.PlaySound("boing");
- this.lastTime = _loc4_;
- }
- }
- }
- }
- function Init()
- {
- super.Init();
- _global.sounds.StartMusic("loop3");
- this.Enemy = "mole1/mole2/stonem.sb";
- var _loc4_ = this;
- }
- function Start()
- {
- super.Start();
- }
- function Close()
- {
- _global.sounds.FadeVolume("jetstream",false,false);
- _global.sounds.FadeVolume("stonemove",false,false);
- super.Close();
- }
- function LevelComplete()
- {
- this.levelComplete = true;
- _global.sounds.FadeVolume("jetstream",false,false);
- _global.sounds.FadeVolume("stonemove",false,false);
- }
- }
-