home *** CD-ROM | disk | FTP | other *** search
- package Code.LOGIC.OBJECTS.GRAPHICS
- {
- import Code.LIB._bm350;
- import Code.LIB._iv163;
- import Code.LIB._pd424;
- import Code.LIB._uu24;
- import Code.LIB._yd42;
- import Code.LOGIC.OBJECTS.ACTORS.BLOB._be439;
- import Code.OPTIONS._dx111;
- import Code.org.cove.ape._be271;
- import Code.org.cove.ape._ms106;
- import flash.display.DisplayObject;
- import flash.display.Sprite;
- import flash.geom.Point;
-
- public class _wv496 extends _ms106
- {
-
- public static const stNormal:int = 0;
-
- public static const stSwim:int = 1;
-
-
- private var mount:DisplayObject;
-
- private var _nu27:Array;
-
- private var swimIndex:int;
-
- private var eyes:DisplayObject;
-
- private var smallBlobsC:_pd424;
-
- private var state:int;
-
- private var blob:_be439;
-
- private var _radius:int;
-
- private var smallBlobsP:_iv163;
-
- public function _wv496(param1:_be439)
- {
- var _loc2_:DisplayObject = null;
- super();
- _radius = param1.radius;
- blob = param1;
- mount = new _dx111.GPlayerBlobNormal() as Sprite;
- mount.scaleX = mount.scaleY = _bm350._tc204 * (_radius / 25);
- eyes = new _dx111.GPlayerEyes() as Sprite;
- eyes.scaleX = eyes.scaleY = _bm350._tc204 * (_radius / 25);
- this._nu27 = new Array(0,0,0);
- _loc2_ = new _dx111.TPS1() as Sprite;
- _loc2_.scaleX = _loc2_.scaleY = _bm350._tc204 * (_radius / 25);
- _nu27[2] = _loc2_;
- _loc2_ = new _dx111.TPS2() as Sprite;
- _loc2_.scaleX = _loc2_.scaleY = _bm350._tc204 * (_radius / 25);
- _nu27[0] = _loc2_;
- _loc2_ = new _dx111.TPS3() as Sprite;
- _loc2_.scaleX = _loc2_.scaleY = _bm350._tc204 * (_radius / 25);
- _nu27[1] = _loc2_;
- this.smallBlobsC = new _pd424();
- this.smallBlobsP = new _iv163();
- State = stNormal;
- }
-
- public static function _fy383(param1:Number) : Sprite
- {
- var _loc2_:Sprite = null;
- var _loc3_:Sprite = null;
- var _loc4_:Sprite = null;
- _loc2_ = new _dx111.GPlayerBlobNormal() as Sprite;
- _loc2_.scaleX = _loc2_.scaleY = param1 / 25;
- _loc3_ = new _dx111.GPlayerEyes() as Sprite;
- _loc3_.scaleX = _loc3_.scaleY = param1 / 25;
- (_loc4_ = new Sprite()).addChild(_loc2_);
- _loc4_.addChild(_loc3_);
- return _loc4_;
- }
-
- public function _cj212(param1:_iv163) : void
- {
- var _loc2_:Point = null;
- var _loc3_:_iv163 = null;
- var _loc4_:int = 0;
- var _loc5_:int = 0;
- _loc2_ = new Point(-1,1);
- if(smallBlobsC.numChildren <= 5)
- {
- _loc4_ = smallBlobsC.numChildren / 4;
- _loc5_ = smallBlobsC.numChildren - 4 * _loc4_;
- _loc2_ = _yd42._sv247(_loc2_,45 * _loc5_);
- _loc2_.normalize(blob.radius * 0.4 + blob.radius * 0.2 * _loc4_);
- param1._vt351 = _loc2_.x;
- param1._lh238 = _loc2_.y;
- }
- else
- {
- param1._vt351 = -Math.random() * blob.radius + 5;
- param1._lh238 = -Math.random() * blob.radius + Math.random() * blob.radius;
- }
- smallBlobsC.addChild(param1);
- _loc3_ = _uu24._ec508(smallBlobsC);
- _loc3_._dn458(smallBlobsP);
- }
-
- override public function onEnterFrame() : void
- {
- var _loc1_:_be271 = null;
- var _loc2_:int = 0;
- var _loc3_:Number = NaN;
- switch(state)
- {
- case stNormal:
- if(blob._rx33.x > 1 && scaleX < 0 || blob._rx33.x < -1 && scaleX > 0)
- {
- scaleX *= -1;
- }
- if(blob.inSect)
- {
- State = stSwim;
- }
- break;
- case stSwim:
- ++swimIndex;
- switch(swimIndex)
- {
- case 1:
- _nu27[0].visible = true;
- _nu27[1].visible = false;
- _nu27[2].visible = false;
- break;
- case 3:
- _nu27[0].visible = false;
- _nu27[1].visible = true;
- _nu27[2].visible = false;
- break;
- case 6:
- _nu27[0].visible = false;
- _nu27[1].visible = false;
- _nu27[2].visible = true;
- break;
- case 9:
- _nu27[0].visible = false;
- _nu27[1].visible = true;
- _nu27[2].visible = false;
- break;
- case 12:
- swimIndex = 0;
- }
- if(!blob.inSect)
- {
- State = stNormal;
- }
- _loc1_ = blob._rx33;
- _loc2_ = -99999;
- if(Math.abs(_loc1_.x) > 0.1 || Math.abs(_loc1_.y) > 0.1)
- {
- _loc3_ = Math.atan(_loc1_.y / _loc1_.x) * (180 / Math.PI);
- _loc2_ = super.rotation < _loc3_ ? 1 : -1;
- super.rotation += _loc2_;
- }
- if(blob._rx33.x > 1 && scaleX < 0 || blob._rx33.x < -1 && scaleX > 0)
- {
- scaleX *= -1;
- if(_loc2_ > -9999)
- {
- super.rotation = _loc2_;
- }
- }
- }
- }
-
- public function set State(param1:int) : void
- {
- state = param1;
- switch(state)
- {
- case stNormal:
- while(this.numChildren != 0)
- {
- removeChildAt(0);
- }
- addChild(mount);
- addChild(eyes);
- addChild(smallBlobsP);
- super.rotation = 0;
- break;
- case stSwim:
- while(this.numChildren != 0)
- {
- removeChildAt(0);
- }
- addChild(_nu27[0]);
- addChild(_nu27[1]);
- addChild(_nu27[2]);
- _nu27[0].visible = false;
- _nu27[1].visible = false;
- _nu27[2].visible = false;
- swimIndex = 0;
- addChild(smallBlobsP);
- }
- }
-
- override public function set rotation(param1:Number) : void
- {
- mount.rotation = param1;
- }
- }
- }
-