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

  1. class AiGoTo
  2. {
  3.    var nom = new String();
  4.    var nextGoToPossibilities = new Array();
  5.    var mcRef = null;
  6.    function AiGoTo(l_mcRef, l_nextGoToPossibilities)
  7.    {
  8.       this.nom = l_mcRef._name;
  9.       this.mcRef = l_mcRef;
  10.       this.nextGoToPossibilities = l_nextGoToPossibilities;
  11.       this.mcRef._visible = false;
  12.    }
  13.    function GetName()
  14.    {
  15.       return this.nom;
  16.    }
  17.    function GetNextGoTo()
  18.    {
  19.       return this.nextGoToPossibilities[_global.C.utils.GetRandomB(0,this.nextGoToPossibilities.length - 1)];
  20.    }
  21.    function GetStageCoord()
  22.    {
  23.       var _loc2_ = new Object();
  24.       _loc2_.x = this.mcRef._x;
  25.       _loc2_.y = this.mcRef._y;
  26.       this.mcRef._parent.localToGlobal(_loc2_);
  27.       return _loc2_;
  28.    }
  29.    function GetZone()
  30.    {
  31.       return _global.C.utils.GetHitZone(this.GetStageCoord);
  32.    }
  33. }
  34.