home *** CD-ROM | disk | FTP | other *** search
/ One Click 21 (Special) / OC021.iso / Juegos / 05-11-10-1.swf / scripts / __Packages / RespawnSpot.as < prev    next >
Encoding:
Text File  |  2005-11-18  |  976 b   |  40 lines

  1. class RespawnSpot
  2. {
  3.    var nom = new String();
  4.    var mcRef = null;
  5.    var nextGoTo = new String();
  6.    function RespawnSpot(l_mcRef, l_nextGoTo)
  7.    {
  8.       this.nom = l_mcRef._name;
  9.       this.mcRef = l_mcRef;
  10.       this.nextGoTo = l_nextGoTo;
  11.       this.mcRef._visible = false;
  12.    }
  13.    function GetAbsDistWithObj(l_aCoord, l_nextGoTo)
  14.    {
  15.       var _loc2_ = this.GetStageCoord();
  16.       return Math.sqrt((_loc2_.x - l_aCoord.x) * (_loc2_.x - l_aCoord.x) + (_loc2_.y - l_aCoord.y) * (_loc2_.y - l_aCoord.y));
  17.    }
  18.    function GetName()
  19.    {
  20.       return this.nom;
  21.    }
  22.    function GetNextGoTo()
  23.    {
  24.       return this.nextGoTo;
  25.    }
  26.    function GetPropCoord()
  27.    {
  28.       var _loc2_ = new Object();
  29.       _loc2_.x = this.mcRef._x;
  30.       _loc2_.y = this.mcRef._y;
  31.       return _loc2_;
  32.    }
  33.    function GetStageCoord()
  34.    {
  35.       var _loc2_ = this.GetPropCoord();
  36.       this.mcRef._parent.localToGlobal(_loc2_);
  37.       return _loc2_;
  38.    }
  39. }
  40.