home *** CD-ROM | disk | FTP | other *** search
- class illusoft.GameTile003 extends illusoft.GameTile
- {
- var gameMC;
- var surfaces;
- var dynamicsEngine;
- var dmc;
- var aniDone = false;
- function GameTile003(id, dEngine, character, game, gamemc, nextLevel)
- {
- super(id,dEngine,character,game,gamemc,nextLevel);
- }
- function Update(x)
- {
- super.Update(x);
- }
- function Init()
- {
- super.Init();
- var _loc4_ = new illusoft.utils.RectangleCheck(546,680,40,35,this.gameMC);
- this.surfaces.push(_loc4_);
- var cref = this;
- _loc4_.onContact = function()
- {
- if(!cref.aniDone)
- {
- cref.dmc.level3ani.play();
- _global.sounds.PlaySound("door");
- cref.game.listenForKeys = false;
- cref.character.dmc._visible = false;
- cref.aniDone = true;
- cref.game.camYSpeed = 0.1;
- cref.game.camXSpeed = 0.1;
- }
- cref.character.AllowJump(false);
- };
- this.dynamicsEngine.addSurface(_loc4_);
- this.aniDone = false;
- this.dmc.level3ani.gotoAndStop(1);
- this.dmc.level3ani.AniDone = function()
- {
- cref.game.listenForKeys = true;
- cref.character.dmc._visible = true;
- cref.game.camYSpeed = 0.3;
- cref.game.camXSpeed = 0.2;
- var _loc1_ = cref.character.dmc;
- _loc1_._x = 1430;
- _loc1_._y = 1100;
- cref.character.SetMC(_loc1_);
- };
- this.dmc.level3ani.SetCam = function(x, y)
- {
- cref.game.worldPos.x += x;
- cref.game.worldPos.y += y;
- };
- _global.sounds.StartMusic("loop1");
- }
- function Close()
- {
- super.Close();
- }
- }
-