home *** CD-ROM | disk | FTP | other *** search
- package Code.LOGIC.OBJECTS.ACTORS.RECTS
- {
- import Code.LOGIC.OBJECTS.ACTORS.INTERFACES._xn130;
- import Code.LOGIC.OBJECTS.GRAPHICS._hi161;
- import Code.LOGIC.OBJECTS.GRAPHICS._px156;
- import Code.LOGIC._cd449;
- import Code.org.cove.ape._be271;
-
- public class _tr528 extends _gg531 implements _xn130
- {
-
- public static const stMove:int = 1;
-
- public static const stFixed:int = 0;
-
- public static const stFree:int = 2;
-
-
- private var initalActive:Boolean;
-
- private var movingDist:int;
-
- private var _active:Boolean = true;
-
- private var initalCoords:_be271;
-
- private var _action:String;
-
- private var _boundable:Boolean;
-
- private var moveObj:Object;
-
- private var rotation:int;
-
- private var _dm39:int;
-
- private var state:int;
-
- private var vel:_be271;
-
- public function _tr528(param1:Object)
- {
- _active = true;
- vel = new _be271();
- super(param1);
- _yt549 = true;
- _boundable = Boolean(param1._ew250);
- if(param1.rotation != 0)
- {
- _boundable = false;
- }
- if(param1.State == stMove)
- {
- moveObj = new Object();
- moveObj.dx = param1.dx;
- moveObj.dy = param1.dy;
- moveObj.dist = param1.dist;
- Move(param1.dx,param1.dy,param1.dist);
- this._mb474(new _hi161(param1.width,param1.height));
- }
- else
- {
- this.rotation = param1.rotation;
- this._mb474(new _px156(this));
- }
- initalCoords = new _be271(param1.x,param1.y);
- _active = param1.active;
- initalActive = _active == true;
- _action = param1.action;
- State = param1.State;
- }
-
- public static function _lu255() : Object
- {
- var _loc1_:Object = null;
- return {
- "toolClass":_tr528,
- "name":"wall",
- "params":{
- "_tp253":0,
- "x":0,
- "y":0,
- "action":"",
- "active":false,
- "width":50,
- "height":50,
- "rotation":0,
- "_ew250":1,
- "states":[["fixed",_tr528.stFixed],["free",_tr528.stFree],["move",_tr528.stMove,[["dx",0],["dy",0],["dist",0]]]]
- }
- };
- }
-
- public function get active() : Boolean
- {
- return _active == true;
- }
-
- public function get action() : String
- {
- return _action.substr(0,_action.length);
- }
-
- public function get _ew250() : Boolean
- {
- return _boundable == true;
- }
-
- public function _he73(param1:String) : void
- {
- switch(param1)
- {
- case "disable":
- _active = false;
- }
- }
-
- public function _eu538() : Object
- {
- var _loc1_:Object = null;
- _loc1_ = new Object();
- _loc1_.prClass = "TWall";
- _loc1_._tp253 = _tp253;
- _loc1_.x = initalCoords.x;
- _loc1_.y = initalCoords.y;
- _loc1_.width = width;
- _loc1_.height = height;
- _loc1_.State = state;
- _loc1_.rotation = this.rotation;
- _loc1_.action = action;
- _loc1_.active = initalActive;
- _loc1_._ew250 = _boundable;
- if(state == stMove)
- {
- _loc1_.dx = moveObj.dx;
- _loc1_.dy = moveObj.dy;
- _loc1_.dist = moveObj.dist;
- }
- return _loc1_;
- }
-
- public function _ur45() : Object
- {
- var _loc1_:Object = null;
- _loc1_ = _lu255();
- _loc1_.params._tp253 = _tp253;
- _loc1_.params.x = initalCoords.x;
- _loc1_.params.y = initalCoords.y;
- _loc1_.params.width = width;
- _loc1_.params.height = height;
- _loc1_.params.rotation = this.rotation;
- _loc1_.params._ew250 = _boundable;
- _loc1_.params.active = initalActive;
- _loc1_.params.action = action;
- _loc1_.State = state;
- return _loc1_;
- }
-
- override public function update(param1:Number) : void
- {
- var _loc2_:_be271 = null;
- super.update(param1);
- switch(state)
- {
- case stMove:
- _loc2_ = new _be271(0,-_cd449.G);
- _pj361(_loc2_);
- position = new _be271(_ej28 + vel.x,_th99 + vel.y);
- if(++_dm39 >= movingDist)
- {
- vel.x *= -1;
- vel.y *= -1;
- State = stMove;
- }
- }
- }
-
- public function set State(param1:int) : void
- {
- state = param1;
- switch(state)
- {
- case stMove:
- _dm39 = 0;
- break;
- case stFree:
- fixed = false;
- }
- }
-
- public function Move(param1:Number, param2:Number, param3:int) : void
- {
- vel.x = param1;
- vel.y = param2;
- movingDist = param3;
- State = stMove;
- }
- }
- }
-