home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Frizzle_fraz.swf / scripts / Code / LOGIC / OBJECTS / ACTORS / BLOB / _la458.as < prev    next >
Encoding:
Text File  |  2008-09-26  |  4.8 KB  |  189 lines

  1. package Code.LOGIC.OBJECTS.ACTORS.BLOB
  2. {
  3.    import Code.LIB.SOUND._wj196;
  4.    import Code.LIB._bm350;
  5.    import Code.LIB._iv163;
  6.    import Code.LIB._uu24;
  7.    import Code.LOGIC.OBJECTS.ACTORS.INTERFACES._mk516;
  8.    import Code.LOGIC.OBJECTS.ACTORS.RECTS._hk305;
  9.    import Code.LOGIC.OBJECTS.ACTORS.RECTS._tr528;
  10.    import Code.LOGIC._cd449;
  11.    import Code.org.cove.ape._be271;
  12.    import Code.org.cove.ape._hu144;
  13.    import Code.org.cove.ape._ku414;
  14.    import Code.org.cove.ape._ms106;
  15.    import Code.org.cove.ape._yo331;
  16.    
  17.    public class _la458 extends _ku414 implements _mk516
  18.    {
  19.       
  20.       public static const stMove:int = 4;
  21.       
  22.       public static const stNormal:int = 0;
  23.       
  24.       public static const stSwim:int = 7;
  25.       
  26.       public static const stFly:int = 6;
  27.       
  28.       public static const stInvisible:int = 1;
  29.       
  30.       public static const stFree:int = 9;
  31.       
  32.       public static const stJump:int = 5;
  33.       
  34.       public static const stDelay:int = 8;
  35.       
  36.       public static const stFixed:int = 3;
  37.       
  38.       public static const stPlum:int = 10;
  39.       
  40.       public static const stNone:int = 2;
  41.        
  42.       
  43.       protected var initalState:int;
  44.       
  45.       private var id:int;
  46.       
  47.       protected var initalCoords:_be271;
  48.       
  49.       private var color:int;
  50.       
  51.       private var _group:_yo331;
  52.       
  53.       public var onUpdate:Function;
  54.       
  55.       protected var state:int;
  56.       
  57.       public function _la458(param1:Object)
  58.       {
  59.          var _loc2_:_ms106 = null;
  60.          var _loc3_:_iv163 = null;
  61.          super(param1.x,param1.y,param1.radius,false);
  62.          id = param1._tp253;
  63.          color = param1.color;
  64.          owner = this;
  65.          _loc2_ = new _ms106();
  66.          _loc2_.graphics.beginFill(color,1);
  67.          _loc2_.graphics.drawCircle(0,0,param1.radius * _bm350._tc204);
  68.          _loc2_.graphics.endFill();
  69.          _loc3_ = _uu24._ec508(_loc2_);
  70.          _loc2_.addChild(_loc3_);
  71.          _mb474(_loc2_);
  72.          initalCoords = new _be271(param1.x,param1.y);
  73.          _my161 = _un167;
  74.       }
  75.       
  76.       public static function _lu255() : Object
  77.       {
  78.          var _loc1_:Object = null;
  79.          return {
  80.             "toolClass":_hg469,
  81.             "name":"blob",
  82.             "params":{
  83.                "radius":10,
  84.                "color":16448250,
  85.                "states":[["jump",_la458.stJump],["fly",_la458.stFly]]
  86.             }
  87.          };
  88.       }
  89.       
  90.       public function set group(param1:_yo331) : void
  91.       {
  92.          _group = param1;
  93.       }
  94.       
  95.       public function _nu27(param1:_hk305) : void
  96.       {
  97.          if(state != stSwim && state != stInvisible)
  98.          {
  99.             State = stSwim;
  100.          }
  101.       }
  102.       
  103.       public function get _tp253() : int
  104.       {
  105.          return id;
  106.       }
  107.       
  108.       public function get State() : int
  109.       {
  110.          return this.state;
  111.       }
  112.       
  113.       public function get group() : _yo331
  114.       {
  115.          return _group;
  116.       }
  117.       
  118.       private function _un167(param1:_hu144, param2:_hu144) : void
  119.       {
  120.          if(param2.owner is _tr528 && _tr528(param2.owner).fixed == false)
  121.          {
  122.             State = stPlum;
  123.          }
  124.       }
  125.       
  126.       public function _eu538() : Object
  127.       {
  128.          var _loc1_:Object = null;
  129.          _loc1_ = new Object();
  130.          _loc1_.prClass = "TActorBlob";
  131.          _loc1_.x = _ej28;
  132.          _loc1_.y = _th99;
  133.          _loc1_.radius = radius;
  134.          _loc1_.State = initalState;
  135.          return _loc1_;
  136.       }
  137.       
  138.       public function _ur45() : Object
  139.       {
  140.          var _loc1_:Object = null;
  141.          _loc1_ = _lu255();
  142.          _loc1_.x = _ej28;
  143.          _loc1_.y = _th99;
  144.          _loc1_.radius = radius;
  145.          return _loc1_;
  146.       }
  147.       
  148.       override public function update(param1:Number) : void
  149.       {
  150.          if(onUpdate != null)
  151.          {
  152.             this.onUpdate(this);
  153.          }
  154.          super.update(param1);
  155.       }
  156.       
  157.       public function get _do489() : Boolean
  158.       {
  159.          return state == stInvisible;
  160.       }
  161.       
  162.       public function set State(param1:int) : void
  163.       {
  164.          var _loc2_:Number = NaN;
  165.          this.state = param1;
  166.          switch(state)
  167.          {
  168.             case stPlum:
  169.                break;
  170.             case stSwim:
  171.                if(_cd449.timerWater > 30)
  172.                {
  173.                   _loc2_ = _cd449.BLOB._ej28;
  174.                   if(Math.abs(_loc2_ - _ej28) < _cd449.screenWidth * 0.8)
  175.                   {
  176.                      _wj196._va384("bulb");
  177.                      _cd449.timerWater = 0;
  178.                   }
  179.                }
  180.          }
  181.       }
  182.       
  183.       public function _xa427() : void
  184.       {
  185.          State = stInvisible;
  186.       }
  187.    }
  188. }
  189.